本文整理汇总了C#中IPropertySet类的典型用法代码示例。如果您正苦于以下问题:C# IPropertySet类的具体用法?C# IPropertySet怎么用?C# IPropertySet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPropertySet类属于命名空间,在下文中一共展示了IPropertySet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Read
internal protected virtual void Read (IPropertySet pset)
{
properties = pset;
intermediateOutputDirectory = pset.GetPathValue ("IntermediateOutputPath");
outputDirectory = pset.GetPathValue ("OutputPath", defaultValue:"." + Path.DirectorySeparatorChar);
debugMode = pset.GetValue<bool> ("DebugSymbols", false);
pauseConsoleOutput = pset.GetValue ("ConsolePause", true);
if (pset.HasProperty ("Externalconsole")) {//for backward compatiblity before version 6.0 it was lowercase
writeExternalConsoleLowercase = true;
externalConsole = pset.GetValue<bool> ("Externalconsole");
} else {
writeExternalConsoleLowercase = false;
externalConsole = pset.GetValue<bool> ("ExternalConsole");
}
commandLineParameters = pset.GetValue ("Commandlineparameters", "");
runWithWarnings = pset.GetValue ("RunWithWarnings", true);
// Special case: when DebugType=none, xbuild returns an empty string
debugType = pset.GetValue ("DebugType");
if (string.IsNullOrEmpty (debugType)) {
debugType = "none";
debugTypeReadAsEmpty = true;
}
debugTypeWasNone = debugType == "none";
var svars = pset.GetValue ("EnvironmentVariables");
ParseEnvironmentVariables (svars, environmentVariables);
// Kep a clone of the loaded env vars, so we can check if they have changed when saving
loadedEnvironmentVariables = new Dictionary<string, string> (environmentVariables);
pset.ReadObjectProperties (this, GetType (), true);
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:34,代码来源:ProjectConfiguration.cs
示例2: Construct
public void Construct(IPropertySet props)
{
const string methodName = "Construct";
configProps = props;
logger.LogMessage(ServerLogger.msgType.debug, methodName, 9999, "firing!");
try
{
// Initialize our logger. Creates the folder and file if it doesn't already exist.
_dtsLogger = new ComLogUtil();
_dtsLogger.FileName = soe_name + "_Log.txt";
_dtsLogger.LogInfo(soe_name, methodName, "DTSAgile logger initialized.");
// Set the root cache directory the tiles should be written to
// TODO: Do we want the root location to be configurable??
var rootDir = @"C:\arcgis\" + soe_name;
_vectorCacheRootDirectory = System.IO.Path.Combine(rootDir, this.CreateMapServiceCacheFolderName());
this.ValidateMapServiceSpatialReference();
}
catch (Exception ex)
{
_dtsLogger.LogError(soe_name, methodName, "none", ex);
logger.LogMessage(ServerLogger.msgType.error, methodName, 9999, "Failed to get ServerObject::ConfigurationName");
}
}
开发者ID:dtsagile,项目名称:arcstache,代码行数:28,代码来源:ArcStache.cs
示例3: GetCacheValue
internal static byte[] GetCacheValue(IPropertySet containerValues)
{
if (!containerValues.ContainsKey(CacheValueLength))
{
return null;
}
int encyptedValueLength = (int)containerValues[CacheValueLength];
int segmentCount = (int)containerValues[CacheValueSegmentCount];
byte[] encryptedValue = new byte[encyptedValueLength];
if (segmentCount == 1)
{
encryptedValue = (byte[])containerValues[CacheValue + 0];
}
else
{
for (int i = 0; i < segmentCount - 1; i++)
{
Array.Copy((byte[])containerValues[CacheValue + i], 0, encryptedValue, i * MaxCompositeValueLength, MaxCompositeValueLength);
}
}
Array.Copy((byte[])containerValues[CacheValue + (segmentCount - 1)], 0, encryptedValue, (segmentCount - 1) * MaxCompositeValueLength, encyptedValueLength - (segmentCount - 1) * MaxCompositeValueLength);
return CryptographyHelper.Decrypt(encryptedValue);
}
开发者ID:ankurchoubeymsft,项目名称:azure-activedirectory-library-for-dotnet,代码行数:26,代码来源:LocalSettingsHelper.cs
示例4: ExtensionLite
public ExtensionLite(AppExtension ext, IPropertySet properties) : this() {
AppExtension = ext;
_valueset = properties;
AppExtensionUniqueId = ext.AppInfo.AppUserModelId + "!" + ext.Id;
Manifest = new ExtensionManifest();
Manifest.AppExtensionUniqueID = AppExtensionUniqueId;
foreach (var prop in properties)
{
switch (prop.Key)
{
case "Title": Manifest.Title = GetValueFromProperty(prop.Value); break;
case "IconUrl": Manifest.IconUrl = GetValueFromProperty(prop.Value); break;
case "Publisher": Manifest.Publisher = GetValueFromProperty(prop.Value); break;
case "Version": Manifest.Version = GetValueFromProperty(prop.Value); break;
case "Abstract": Manifest.Abstract = GetValueFromProperty(prop.Value); break;
case "FoundInToolbarPositions": Manifest.FoundInToolbarPositions = (ExtensionInToolbarPositions)Enum.Parse(typeof(ExtensionInToolbarPositions), GetValueFromProperty(prop.Value)); break;
case "LaunchInDockPositions": Manifest.LaunchInDockPositions = (ExtensionInToolbarPositions)Enum.Parse(typeof(ExtensionInToolbarPositions), GetValueFromProperty(prop.Value)); break;
case "ContentControl": Manifest.ContentControl = GetValueFromProperty(prop.Value); break;
case "AssemblyName": Manifest.AssemblyName = GetValueFromProperty(prop.Value); break;
case "IsExtEnabled": Manifest.IsExtEnabled = bool.Parse(GetValueFromProperty(prop.Value)); AppSettings.AppExtensionEnabled = Manifest.IsExtEnabled; break;
case "IsUWPExtension": Manifest.IsUWPExtension = bool.Parse(GetValueFromProperty(prop.Value)); break;
case "Size": Manifest.Size = int.Parse(GetValueFromProperty(prop.Value)); break;
}
}
}
开发者ID:liquidboy,项目名称:X,代码行数:27,代码来源:ExtensionLite.cs
示例5: GeocodeAddress
private void GeocodeAddress(IPropertySet addressProperties)
{
// Match the Address
IAddressGeocoding addressGeocoding = m_locator as IAddressGeocoding;
IPropertySet resultSet = addressGeocoding.MatchAddress(addressProperties);
// Print out the results
object names, values;
resultSet.GetAllProperties(out names, out values);
string[] namesArray = names as string[];
object[] valuesArray = values as object[];
int length = namesArray.Length;
IPoint point = null;
for (int i = 0; i < length; i++)
{
if (namesArray[i] != "Shape")
this.ResultsTextBox.Text += namesArray[i] + ": " + valuesArray[i].ToString() + "\n";
else
{
if (point != null && !point.IsEmpty)
{
point = valuesArray[i] as IPoint;
this.ResultsTextBox.Text += "X: " + point.X + "\n";
this.ResultsTextBox.Text += "Y: " + point.Y + "\n";
}
}
}
this.ResultsTextBox.Text += "\n";
}
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:30,代码来源:SingleLineGeocodingForm.cs
示例6: CreatePropertyValueMap
/// <summary>
/// Creates the property value map.
/// </summary>
/// <param name="props"> The props. </param>
/// <returns> </returns>
public Dictionary<MonthTypeContainer, string> CreatePropertyValueMap(IPropertySet props)
{
return new Dictionary<MonthTypeContainer, string>
{
{new MonthTypeContainer("January", "Duration"), "DUR1"},
{new MonthTypeContainer("February", "Duration"), "DUR2"},
{new MonthTypeContainer("March", "Duration"), "DUR3"},
{new MonthTypeContainer("April", "Duration"), "DUR4"},
{new MonthTypeContainer("May", "Duration"), "DUR5"},
{new MonthTypeContainer("June", "Duration"), "DUR6"},
{new MonthTypeContainer("July", "Duration"), "DUR7"},
{new MonthTypeContainer("August", "Duration"), "DUR8"},
{new MonthTypeContainer("September", "Duration"), "DUR9"},
{new MonthTypeContainer("October", "Duration"), "DUR10"},
{new MonthTypeContainer("November", "Duration"), "DUR11"},
{new MonthTypeContainer("December", "Duration"), "DUR12"},
{new MonthTypeContainer("January", "Radiation"), "SOL1"},
{new MonthTypeContainer("February", "Radiation"), "SOL2"},
{new MonthTypeContainer("March", "Radiation"), "SOL3"},
{new MonthTypeContainer("April", "Radiation"), "SOL4"},
{new MonthTypeContainer("May", "Radiation"), "SOL5"},
{new MonthTypeContainer("June", "Radiation"), "SOL6"},
{new MonthTypeContainer("July", "Radiation"), "SOL7"},
{new MonthTypeContainer("August", "Radiation"), "SOL8"},
{new MonthTypeContainer("September", "Radiation"), "SOL9"},
{new MonthTypeContainer("October", "Radiation"), "SOL10"},
{new MonthTypeContainer("November", "Radiation"), "SOL11"},
{new MonthTypeContainer("December", "Radiation"), "SOL12"},
{new MonthTypeContainer("Annual", "Duration"), "DURANN"}
};
}
开发者ID:steveoh,项目名称:SolarCalculator,代码行数:36,代码来源:DebugConfiguration.cs
示例7: Construct
public void Construct(IPropertySet props)
{
configProps = props;
String connString = "Data Source=WCMC-GIS-03\\SQL2008WEB;Initial Catalog='csn';User Id=sde;Password=conserveworld;";
sqlConn = new SqlConnection(connString);
sqlConn.Open();
}
开发者ID:andrewcottam,项目名称:IWC-ArcGIS-ServerObjectExtensions,代码行数:7,代码来源:InternationalWaterbirdCensusExtensions.cs
示例8: Clone
/// <summary> Copy the contents of one propertyset into another.
/// </summary>
/// <param name="src">The propertyset to copy from.
/// </param>
/// <param name="dest">The propertyset to copy into.
///
/// </param>
public static void Clone(IPropertySet src, IPropertySet dest)
{
PropertySetCloner cloner = new PropertySetCloner();
cloner.Source = src;
cloner.Destination = dest;
cloner.cloneProperties();
}
开发者ID:BackupTheBerlios,项目名称:nwf,代码行数:14,代码来源:PropertySetManager.cs
示例9: GetWorkspaceSDEFromConnectionPropertySet
public static IWorkspace GetWorkspaceSDEFromConnectionPropertySet(IPropertySet propertySet)
{
if (propertySet == null)
throw new ArgumentNullException("propertySet");
String connectionProperties = null;
try
{
// for error reference - convert to string
connectionProperties = PropertySetToString(propertySet);
var factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory");
var workspaceFactory = (IWorkspaceFactory2)Activator.CreateInstance(factoryType);
// Enable Schema Cache
IWorkspaceFactorySchemaCache workspaceFactorySchemaCache =
(IWorkspaceFactorySchemaCache)workspaceFactory;
workspaceFactorySchemaCache.EnableSchemaCaching();
return workspaceFactory.Open(propertySet, 0);
}
catch (Exception ex)
{
throw new Exception(
String.Format("Failed to Open SDE Workspace from connection properties [{0}]", connectionProperties),
ex);
}
}
开发者ID:Ehryk,项目名称:sde2string,代码行数:27,代码来源:ArcObjects_Workspace_Examples.cs
示例10: SetCacheValue
internal static void SetCacheValue(IPropertySet containerValues, byte[] value)
{
byte[] encryptedValue = CryptographyHelper.Encrypt(value);
containerValues[CacheValueLength] = encryptedValue.Length;
if (encryptedValue == null)
{
containerValues[CacheValueSegmentCount] = 1;
containerValues[CacheValue + 0] = null;
}
else
{
int segmentCount = (encryptedValue.Length / MaxCompositeValueLength) + ((encryptedValue.Length % MaxCompositeValueLength == 0) ? 0 : 1);
byte[] subValue = new byte[MaxCompositeValueLength];
for (int i = 0; i < segmentCount - 1; i++)
{
Array.Copy(encryptedValue, i * MaxCompositeValueLength, subValue, 0, MaxCompositeValueLength);
containerValues[CacheValue + i] = subValue;
}
int copiedLength = (segmentCount - 1) * MaxCompositeValueLength;
Array.Copy(encryptedValue, copiedLength, subValue, 0, encryptedValue.Length - copiedLength);
containerValues[CacheValue + (segmentCount - 1)] = subValue;
containerValues[CacheValueSegmentCount] = segmentCount;
}
}
开发者ID:ankurchoubeymsft,项目名称:azure-activedirectory-library-for-dotnet,代码行数:25,代码来源:LocalSettingsHelper.cs
示例11: PropertySet
public PropertySet(
IPropertySet other,
IListener listener,
IPolicies policies,
ICompilerMessageBuilder messageProvider,
int interfaceIndex)
{
if(ReferenceEquals(other, null))
throw new ArgumentNullException(nameof(other));
if (ReferenceEquals(listener, null))
throw new ArgumentNullException(nameof(listener));
if (ReferenceEquals(policies, null))
throw new ArgumentNullException(nameof(policies));
if (ReferenceEquals(messageProvider, null))
throw new ArgumentNullException(nameof(messageProvider));
this.InterfaceName = other.InterfaceName ?? policies.GenerateSurrogateInterfaceName(interfaceIndex);
if (ReferenceEquals(other.InterfaceName, null))
listener.Error(messageProvider.MissingInterfaceName(this.InterfaceName, interfaceIndex));
if (false == policies.IsValidInterfaceName(this.InterfaceName))
listener.Error(messageProvider.InvalidInterfaceName(this.InterfaceName, interfaceIndex));
if (ReferenceEquals(other.Properties, null))
{
listener.Error(messageProvider.EmptyPropertiesList(this.InterfaceName, interfaceIndex));
return;
}
int propertyIndex = 0;
foreach (var property in other.Properties.OfType<IBasicProperty>())
{
this.Properties.Add(
new BasicProperty(property, listener, policies, messageProvider, propertyIndex++));
}
propertyIndex = 0;
foreach (var property in other.Properties.OfType<IBlobProperty>())
{
this.Properties.Add(
new BlobProperty(property, listener, policies, messageProvider, propertyIndex++));
}
propertyIndex = 0;
foreach (var property in other.Properties.OfType<ITableValueProperty>())
{
this.Properties.Add(
new TableValueProperty(property, listener, policies, messageProvider, propertyIndex++));
}
this.m_ixPropertyByName = this.Properties.ToDictionary(
p => p.PropertyName,
StringComparer.OrdinalIgnoreCase);
}
开发者ID:AlexeyEvlampiev,项目名称:Alenosoft,代码行数:55,代码来源:PropertySet.cs
示例12: CreatePropertyValueMap
/// <summary>
/// Creates the property value map.
/// </summary>
/// <param name="props"> The props. </param>
/// <returns> </returns>
public Dictionary<MonthTypeContainer, string> CreatePropertyValueMap(IPropertySet props)
{
const string properties =
"January.Duration=;February.Duration=;March.Duration=;April.Duration=;May.Duration=;June.Duration=;July.Duration=;August.Duration=;September.Duration=;October.Duration=;November.Duration=;December.Duration=;" +
"January.Radiation=;February.Radiation=;March.Radiation=;April.Radiation=;May.Radiation=;June.Radiation=;July.Radiation=;August.Radiation=;September.Radiation=;October.Radiation=;November.Radiation=;December.Radiation=;" +
"Annual.Duration=";
return properties.Replace("=", "").Split(';')
.ToDictionary(key => CommandExecutor.ExecuteCommand(new CreateEnumsFromPropertyStringsCommand(key)),
value => props.GetValueAsString(value));
}
开发者ID:steveoh,项目名称:SolarCalculator,代码行数:16,代码来源:UserConfiguration.cs
示例13: Construct
public void Construct(IPropertySet props)
{
configProps = props;
strServer = props.GetProperty("Server").ToString();
strInstance = props.GetProperty("Instance").ToString();
strDatabase = props.GetProperty("Database").ToString();
strVersion = props.GetProperty("Version").ToString();
strUser = props.GetProperty("User").ToString();
strPasswd = props.GetProperty("Password").ToString();
}
开发者ID:ericoneal,项目名称:GetDomains,代码行数:11,代码来源:GetDomains.cs
示例14: Construct
public override void Construct(IPropertySet props)
{
base.Construct(props);
m_layers = new Dictionary<int, QueryRasterLayer>();
JsonObject result = new JsonObject();
List<QueryRasterLayer> layerInfo = new List<QueryRasterLayer>();
foreach (IMapLayerInfo layer in GetMapLayerInfo()) {
IRaster raster = GetDataSourceByID(layer.ID) as IRaster;
if (raster != null) {
m_layers.Add(layer.ID, new QueryRasterLayer(layer, raster));
}
}
}
开发者ID:NGFieldScope,项目名称:FieldScope-SOE,代码行数:13,代码来源:QueryRasterSOE.cs
示例15: Init
public void Init()
{
PropertyInfo info = this.GetMemberOperationBase().GetMemberInfo() as PropertyInfo;
if (info != null)
{
if ((this.IPropertyGet == null) && info.CanRead)
{
this.IPropertyGet = PropertyDelegateContainer.CreateIPropertyGet(info);
}
if ((this.IPropertySet == null) && info.CanWrite)
{
this.IPropertySet = PropertyDelegateContainer.CreateIPropertySet(info);
}
}
}
开发者ID:nakijun,项目名称:FastDBEngine,代码行数:15,代码来源:MeberOperationHelper.cs
示例16: Construct
public void Construct(IPropertySet props)
{
_configProps = props;
imageServerInit = (IImageServerInit3)_serverObjectHelper.ServerObject;
IName mosaicName = imageServerInit.ImageDataSourceName;
if (mosaicName is IMosaicDatasetName)
{
IMosaicDataset md = (IMosaicDataset)mosaicName.Open();
_mosaicCatalog = md.Catalog;
_supportRasterItemAccess = true;
}
else
_supportRasterItemAccess = false;
}
开发者ID:xyhxyw,项目名称:DeveloperSumit2014,代码行数:16,代码来源:Image_Services_SOE.cs
示例17: Construct
public void Construct(IPropertySet props)
{
configProps = props;
// Read the properties.
try
{
logger.LogMessage(ServerLogger.msgType.infoDetailed, "Construct", 8000, "Constructing IUCNRedListSOE");
// Get the feature layer to be queried.
IMapServer3 mapServer = (IMapServer3)serverObjectHelper.ServerObject;
string mapName = mapServer.DefaultMapName;
IMapLayerInfo layerInfo;
IMapLayerInfos layerInfos = mapServer.GetServerInfo(mapName).MapLayerInfos;
// Find the index position of the map layer to query.
int c = layerInfos.Count;
int layerIndex = 0;
for (int i = 0; i < c; i++)
{
layerInfo = layerInfos.get_Element(i);
if (layerInfo.Name == "Species")
{
layerIndex = i;
break;
}
}
// Using IMapServerDataAccess to get the data, allows you to support MSD-based services.
IMapServerDataAccess dataAccess = (IMapServerDataAccess)mapServer;
// Get access to the source feature class.
speciesFeatureClass = (IFeatureClass)dataAccess.GetDataSource(mapName, layerIndex);
if (speciesFeatureClass == null)
{
logger.LogMessage(ServerLogger.msgType.error, "Construct", 8000, "SOE custom error: Layer name not found.");
return;
}
else
{
logger.LogMessage(ServerLogger.msgType.infoDetailed, "Construct", 8000, "Succesfully found Species Layer.");
}
}
catch
{
logger.LogMessage(ServerLogger.msgType.error, "Construct", 8000, "SOE custom error: Could not get the feature layer.");
}
}
开发者ID:andrewcottam,项目名称:IUCNRedListSOEs,代码行数:44,代码来源:IUCNRedListSOE.cs
示例18: PropertySetToDictionary
public static Dictionary<string, object> PropertySetToDictionary(IPropertySet propertySet)
{
if (propertySet == null)
throw new ArgumentNullException("propertySet");
Int32 propertyCount = propertySet.Count;
Dictionary<string, object> dictionary = new Dictionary<string, object>();
object[] nameArray = new object[1];
object[] valueArray = new object[1];
propertySet.GetAllProperties(out nameArray[0], out valueArray[0]);
object[] names = (object[])nameArray[0];
object[] values = (object[])valueArray[0];
for (int i = 0; i < propertyCount; i++)
{
dictionary.Add(names[i].ToString(), values[i]);
}
return dictionary;
}
开发者ID:Ehryk,项目名称:sde2string,代码行数:20,代码来源:GDBUtilities.cs
示例19: GetProperties
protected void GetProperties(IPropertySet propset)
{
object[] nameArray = new object[1];
object[] valueArray = new object[1];
propset.GetAllProperties(out nameArray[0], out valueArray[0]);
object[] names = (object[])nameArray[0];
object[] values = (object[])valueArray[0];
System.Text.StringBuilder sb = new StringBuilder();
for (int i = 0; i < names.Length; i++)
{
sb.AppendLine(String.Format("{0}: {1}", names[i], values[i].ToString()));
}
System.Diagnostics.Debug.WriteLine(sb.ToString());
}
开发者ID:phpmaps,项目名称:Server-Object-Configuration-Example,代码行数:21,代码来源:GetManifest.cs
示例20: AddRastersToImageService
public static void AddRastersToImageService(IImageServer imageServer, List<string> fileNames, List<string> fileUrls, IPropertySet attributes)
{
//Construct an item description.
IRasterItemDescription itemDescription = new RasterItemDescriptionClass();
//Define source raster names, locations, and type.
IStringArray dataFileNames = new StrArrayClass();
//File names example: Image32.tif, Image32.tfw, Image32.aux.
foreach (string fileName in fileNames) dataFileNames.Add(fileName);
itemDescription.DataFileNames = dataFileNames;
IStringArray dataFileURLs = new StrArrayClass();
//File URL examples: c:\temp\Image32.tif, c:\temp\Image32.tfw, http:\\host\Image32.aux.
foreach (string fileurl in fileUrls) dataFileURLs.Add(fileurl);
itemDescription.DataFileURLs = dataFileURLs;
itemDescription.Type = "Raster Dataset";
//Raster pyramids,statistics,thumbnail.
itemDescription.BuildPyramids = false;
itemDescription.BuildThumbnail = false;
itemDescription.ComputeStatistics = false;
//If you need to overwrite default raster properties/metadata, provide here.
itemDescription.Properties = attributes; //Construct item descriptions.
IRasterItemDescriptions itemDescriptions = new RasterItemDescriptionsClass();
itemDescriptions.Add(itemDescription); //Add.
IImageServerEditResults isEditResults = ((IImageServer4)imageServer).Add(itemDescriptions);
}
开发者ID:xyhxyw,项目名称:DeveloperSumit2014,代码行数:24,代码来源:AddRaster.cs
注:本文中的IPropertySet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论