当前位置: 首页>>代码示例>>C#>>正文


C# IPropertySet类代码示例

本文整理汇总了C#中IPropertySet的典型用法代码示例。如果您正苦于以下问题:C# IPropertySet类的具体用法?C# IPropertySet怎么用?C# IPropertySet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPropertySet类属于命名空间,在下文中一共展示了IPropertySet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: CopyFrom

		public override void CopyFrom (OperationContext other)
		{
			base.CopyFrom (other);
			var o = other as ProjectOperationContext;
			if (o != null)
				GlobalProperties = new ProjectItemMetadata ((ProjectItemMetadata) o.GlobalProperties);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:ProjectOperationContext.cs

示例15: MainPage

        public MainPage()
        {
            this.InitializeComponent();
            appSettings = ApplicationData.Current.RoamingSettings.Values;

            _current = this;
        }
开发者ID:micaelcarlstedt,项目名称:MyDashboardDemo,代码行数:7,代码来源:MainPage.xaml.cs


注:本文中的IPropertySet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。