• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Configuration.ConfigurationPropertyCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ConfigurationPropertyCollection类属于System.Configuration命名空间,在下文中一共展示了ConfigurationPropertyCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CacheRegionElement

		/// <summary>
		/// Initializes the <see cref="CacheRegionElement"/> class.
		/// </summary>
		static CacheRegionElement()
		{
			//building the properties collection and overriding the properties property apparently
			//increases performace considerably
			properties = new ConfigurationPropertyCollection();

			var nameProperty = new ConfigurationProperty("name", typeof (string), String.Empty,
			                                             ConfigurationPropertyOptions.IsKey);

			properties.Add(nameProperty);

			var relativeExpirationProperty = new ConfigurationProperty("relativeExpiration", typeof (TimeSpan?), null,
			                                                           new TimeSpanSecondsConverter(), null,
			                                                           ConfigurationPropertyOptions.None);

			properties.Add(relativeExpirationProperty);

			var timeOfDayExpirationProperty = new ConfigurationProperty("timeOfDayExpiration", typeof (TimeSpan?), null, null,
			                                                            new NullableTimeSpanValidator(new TimeSpan(0, 0, 0),
			                                                                                          new TimeSpan(23, 59, 59),
			                                                                                          false),
			                                                            ConfigurationPropertyOptions.None);

			properties.Add(timeOfDayExpirationProperty);

			var priorityProperty = new ConfigurationProperty("priority", typeof (CacheItemPriority), CacheItemPriority.Default,
			                                                 ConfigurationPropertyOptions.None);

			properties.Add(priorityProperty);

			var dependenciesProperty = new ConfigurationProperty("dependencies", typeof (CacheDependenciesElement), null,
			                                                     ConfigurationPropertyOptions.None);

			properties.Add(dependenciesProperty);
		}
开发者ID:polyzois,项目名称:NHibernate.Diegose,代码行数:38,代码来源:CacheRegionElement.cs


示例2: ConnectionStringSettings

 static ConnectionStringSettings() {
     // Property initialization
     _properties = new ConfigurationPropertyCollection();
     _properties.Add(_propName);
     _properties.Add(_propConnectionString);
     _properties.Add(_propProviderName);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:ConnectionStringSettings.cs


示例3: WebPartsPersonalization

        static WebPartsPersonalization() {
            _properties = new ConfigurationPropertyCollection();

            _properties.Add(_propDefaultProvider);
            _properties.Add(_propProviders);
            _properties.Add(_propAuthorization);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:WebPartsPersonalization.cs


示例4: ProfilePropertySettings

		static ProfilePropertySettings ()
		{
			allowAnonymousProp = new ConfigurationProperty ("allowAnonymous", typeof (bool), false);
			customProviderDataProp = new ConfigurationProperty ("customProviderData", typeof (string), "");
			defaultValueProp = new ConfigurationProperty ("defaultValue", typeof (string), "");
			nameProp = new ConfigurationProperty ("name", typeof (string), null,
							      TypeDescriptor.GetConverter (typeof (string)),
							      new ProfilePropertyNameValidator (),
							      ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
			providerProp = new ConfigurationProperty ("provider", typeof (string), "");
			readOnlyProp = new ConfigurationProperty ("readOnly", typeof (bool), false);
			serializeAsProp = new ConfigurationProperty ("serializeAs", typeof (SerializationMode), SerializationMode.ProviderSpecific,
								     new GenericEnumConverter (typeof (SerializationMode)),
								     PropertyHelper.DefaultValidator,
								     ConfigurationPropertyOptions.None);
			typeProp = new ConfigurationProperty ("type", typeof (string), "string");

			properties = new ConfigurationPropertyCollection ();
			properties.Add (allowAnonymousProp);
			properties.Add (customProviderDataProp);
			properties.Add (defaultValueProp);
			properties.Add (nameProp);
			properties.Add (providerProp);
			properties.Add (readOnlyProp);
			properties.Add (serializeAsProp);
			properties.Add (typeProp);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:27,代码来源:ProfilePropertySettings.cs


示例5: ProfileSettings

		static ProfileSettings ()
		{
			customProp = new ConfigurationProperty ("custom", typeof (string), "");
			maxLimitProp = new ConfigurationProperty ("maxLimit", typeof (int), Int32.MaxValue,
								  PropertyHelper.InfiniteIntConverter,
								  PropertyHelper.IntFromZeroToMaxValidator,
								  ConfigurationPropertyOptions.None);
			minInstancesProp = new ConfigurationProperty ("minInstances", typeof (int), 1,
								      TypeDescriptor.GetConverter (typeof (int)),
								      new IntegerValidator (1, Int32.MaxValue),
								      ConfigurationPropertyOptions.None);
			minIntervalProp = new ConfigurationProperty ("minInterval", typeof (TimeSpan), TimeSpan.FromSeconds (0),
								     PropertyHelper.InfiniteTimeSpanConverter,
								     PropertyHelper.DefaultValidator,
								     ConfigurationPropertyOptions.None);
			nameProp = new ConfigurationProperty ("name", typeof (string), "",
							      TypeDescriptor.GetConverter (typeof (string)),
							      PropertyHelper.NonEmptyStringValidator,
							      ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
			properties = new ConfigurationPropertyCollection ();

			properties.Add (customProp);
			properties.Add (maxLimitProp);
			properties.Add (minInstancesProp);
			properties.Add (minIntervalProp);
			properties.Add (nameProp);

		}
开发者ID:nlhepler,项目名称:mono,代码行数:28,代码来源:ProfileSettings.cs


示例6: MessageLoggingElement

		static MessageLoggingElement ()
		{
			properties = new ConfigurationPropertyCollection ();
			filters = new ConfigurationProperty ("filters",
				typeof (XPathMessageFilterElementCollection), null, null/* FIXME: get converter for XPathMessageFilterElementCollection*/, null,
				ConfigurationPropertyOptions.None);

			log_entire_message = new ConfigurationProperty ("logEntireMessage", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None);

			log_known_pii = new ConfigurationProperty ("logKnownPii", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None);

			log_malformed_messages = new ConfigurationProperty ("logMalformedMessages", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None);

			log_messages_at_service_level = new ConfigurationProperty ("logMessagesAtServiceLevel", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None);

			log_messages_at_transport_level = new ConfigurationProperty ("logMessagesAtTransportLevel", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None);

			max_messages_to_log = new ConfigurationProperty ("maxMessagesToLog", typeof (int), "10000", null, null, ConfigurationPropertyOptions.None);

			max_size_of_message_to_log = new ConfigurationProperty ("maxSizeOfMessageToLog", typeof (int), 262144, null, null, ConfigurationPropertyOptions.None);

			properties.Add (filters);
			properties.Add (log_entire_message);
			properties.Add (log_known_pii);
			properties.Add (log_malformed_messages);
			properties.Add (log_messages_at_service_level);
			properties.Add (log_messages_at_transport_level);
			properties.Add (max_messages_to_log);
			properties.Add (max_size_of_message_to_log);
		}
开发者ID:nickchal,项目名称:pash,代码行数:30,代码来源:MessageLoggingElement.cs


示例7: MemoryCacheSection

		static MemoryCacheSection ()
		{
			namedCachesProp = new ConfigurationProperty ("namedCaches", typeof (MemoryCacheSettingsCollection), null);

			properties = new ConfigurationPropertyCollection ();
			properties.Add (namedCachesProp);
		}
开发者ID:nzdunic,项目名称:ravendb,代码行数:7,代码来源:MemoryCacheSection.cs


示例8: CertificateReferenceElement

		static CertificateReferenceElement ()
		{
			properties = new ConfigurationPropertyCollection ();
			find_value = new ConfigurationProperty ("findValue",
				typeof (string), "", new StringConverter (), null,
				ConfigurationPropertyOptions.None);

			is_chain_included = new ConfigurationProperty ("isChainIncluded",
				typeof (bool), "false", new BooleanConverter (), null,
				ConfigurationPropertyOptions.None);

			store_location = new ConfigurationProperty ("storeLocation",
				typeof (StoreLocation), "LocalMachine", null/* FIXME: get converter for StoreLocation*/, null,
				ConfigurationPropertyOptions.None);

			store_name = new ConfigurationProperty ("storeName",
				typeof (StoreName), "My", null/* FIXME: get converter for StoreName*/, null,
				ConfigurationPropertyOptions.None);

			x509_find_type = new ConfigurationProperty ("x509FindType",
				typeof (X509FindType), "FindBySubjectDistinguishedName", null/* FIXME: get converter for X509FindType*/, null,
				ConfigurationPropertyOptions.None);

			properties.Add (find_value);
			properties.Add (is_chain_included);
			properties.Add (store_location);
			properties.Add (store_name);
			properties.Add (x509_find_type);
		}
开发者ID:nickchal,项目名称:pash,代码行数:29,代码来源:CertificateReferenceElement.cs


示例9: ParameterRulesElement

        static ParameterRulesElement()
        {
            _ignoreRules = new ConfigurationProperty(
                "ignore",
                typeof(IgnoreRuleElementCollection),
                null,
                ConfigurationPropertyOptions.None
            );

            _requireRules = new ConfigurationProperty(
                "require",
                typeof(RequireRuleElementCollection),
                null,
                ConfigurationPropertyOptions.None
            );

            _mappingRules = new ConfigurationProperty(
                "mapping",
                typeof(MappingRuleElementCollection),
                null,
                ConfigurationPropertyOptions.None
            );

            _properties = new ConfigurationPropertyCollection()
            {
                _ignoreRules,
                _requireRules,
                _mappingRules,
            };
        }
开发者ID:FACT-Finder,项目名称:FACT-Finder-.NET-Library,代码行数:30,代码来源:ParameterRulesElement.cs


示例10: RoleManagerSection

		static RoleManagerSection ()
		{
			cacheRolesInCookieProp = new ConfigurationProperty ("cacheRolesInCookie", typeof (bool), false);
			cookieNameProp = new ConfigurationProperty ("cookieName", typeof (string), ".ASPXROLES");
			cookiePathProp = new ConfigurationProperty ("cookiePath", typeof (string), "/");
			cookieProtectionProp = new ConfigurationProperty ("cookieProtection", typeof (CookieProtection),
									  CookieProtection.All);
			cookieRequireSSLProp = new ConfigurationProperty ("cookieRequireSSL", typeof (bool), false);
			cookieSlidingExpirationProp = new ConfigurationProperty ("cookieSlidingExpiration", typeof (bool), true);
			cookieTimeoutProp = new ConfigurationProperty ("cookieTimeout", typeof (TimeSpan), TimeSpan.FromMinutes (30),
								       PropertyHelper.TimeSpanMinutesOrInfiniteConverter,
								       PropertyHelper.PositiveTimeSpanValidator,
								       ConfigurationPropertyOptions.None);
			createPersistentCookieProp = new ConfigurationProperty ("createPersistentCookie", typeof (bool), false);
			defaultProviderProp = new ConfigurationProperty ("defaultProvider", typeof (string), "AspNetSqlRoleProvider");
			domainProp = new ConfigurationProperty ("domain", typeof (string), "");
			enabledProp = new ConfigurationProperty ("enabled", typeof (bool), false);
			maxCachedResultsProp = new ConfigurationProperty ("maxCachedResults", typeof (int), 25);
			providersProp = new ConfigurationProperty ("providers", typeof (ProviderSettingsCollection));

			properties = new ConfigurationPropertyCollection ();
			properties.Add (cacheRolesInCookieProp);
			properties.Add (cookieNameProp);
			properties.Add (cookiePathProp);
			properties.Add (cookieProtectionProp);
			properties.Add (cookieRequireSSLProp);
			properties.Add (cookieSlidingExpirationProp);
			properties.Add (cookieTimeoutProp);
			properties.Add (createPersistentCookieProp);
			properties.Add (defaultProviderProp);
			properties.Add (domainProp);
			properties.Add (enabledProp);
			properties.Add (maxCachedResultsProp);
			properties.Add (providersProp);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:35,代码来源:RoleManagerSection.cs


示例11: ResourcePurviewElement

        static ResourcePurviewElement()
        {
            _Name = new ConfigurationProperty("name", typeof(string), string.Empty, ConfigurationPropertyOptions.IsKey | ConfigurationPropertyOptions.IsRequired);
            _Value = new ConfigurationProperty("value", typeof(string), string.Empty, ConfigurationPropertyOptions.IsRequired);

            _Properties = new ConfigurationPropertyCollection();
        }
开发者ID:roytown,项目名称:Bag,代码行数:7,代码来源:ResourcePurviewElement.cs


示例12: ExampleSection

        /// <summary>
        /// Predefines the valid properties and prepares
        /// the property collection.
        /// </summary>
        static ExampleSection()
        {
            // Predefine properties here
            s_propString = new ConfigurationProperty(
                "stringValue",
                typeof(string),
                null,
                ConfigurationPropertyOptions.IsRequired
            );

            s_propBool = new ConfigurationProperty(
                "boolValue",
                typeof(bool),
                false,
                ConfigurationPropertyOptions.None
            );

            s_propTimeSpan = new ConfigurationProperty(
                "timeSpanValue",
                typeof(TimeSpan),
                null,
                ConfigurationPropertyOptions.None
            );

            s_properties = new ConfigurationPropertyCollection();

            s_properties.Add(s_propString);
            s_properties.Add(s_propBool);
            s_properties.Add(s_propTimeSpan);
        }
开发者ID:sgh1986915,项目名称:.net-braintree-spa,代码行数:34,代码来源:AuthenticationToggle.cs


示例13: WebProxyScriptElement

                static WebProxyScriptElement ()
                {
                        downloadTimeoutProp = new ConfigurationProperty ("downloadTimeout", typeof (TimeSpan), new TimeSpan (0,0,2,0));
                        properties = new ConfigurationPropertyCollection ();

                        properties.Add (downloadTimeoutProp);
                }
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:WebProxyScriptElement.cs


示例14: WorkflowRuntimeServiceElement

		static WorkflowRuntimeServiceElement ()
			{
				typeProp = new ConfigurationProperty ("type", typeof (string), "");
				properties = new ConfigurationPropertyCollection ();

				properties.Add (typeProp);
			}
开发者ID:alesliehughes,项目名称:olive,代码行数:7,代码来源:WorkflowRuntimeServiceElement.cs


示例15: BuildProperties

 private static ConfigurationPropertyCollection BuildProperties() {
     ConfigurationPropertyCollection props = new ConfigurationPropertyCollection();
     props.Add(_propConverters);
     props.Add(_propRecursionLimitLimit);
     props.Add(_propMaxJsonLength);
     return props;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:ScriptingJsonSerializationSection.cs


示例16: WindowsFormsSection

		public WindowsFormsSection ()
		{
			properties = new ConfigurationPropertyCollection();
			jit_debugging = new ConfigurationProperty ("jitDebugging", typeof (bool), false);

			properties.Add (jit_debugging);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:WindowsFormsSection.cs


示例17: CodeDomConfigurationHandler

		static CodeDomConfigurationHandler ()
		{
			default_compilers = new CompilerCollection ();
			compilersProp = new ConfigurationProperty ("compilers", typeof (CompilerCollection), default_compilers);
			properties = new ConfigurationPropertyCollection ();
			properties.Add (compilersProp);
		}
开发者ID:ngraziano,项目名称:mono,代码行数:7,代码来源:CodeDomConfigurationHandler.cs


示例18: HttpHandlerAction

 static HttpHandlerAction() {
     _properties = new ConfigurationPropertyCollection();
     _properties.Add(_propPath);
     _properties.Add(_propVerb);
     _properties.Add(_propType);
     _properties.Add(_propValidate);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:7,代码来源:HttpHandlerAction.cs


示例19: DiagnosticsElement

		static DiagnosticsElement ()
		{
			suppressReturningExceptionsProp = new ConfigurationProperty ("suppressReturningExceptions", typeof (bool), false);
			properties = new ConfigurationPropertyCollection ();

			properties.Add (suppressReturningExceptionsProp);
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:DiagnosticsElement.cs


示例20: WebMessageEncodingElement

		static WebMessageEncodingElement ()
		{
			properties = new ConfigurationPropertyCollection ();
			binding_element_type = new ConfigurationProperty ("",
				typeof (Type), null, new TypeConverter (), null,
				ConfigurationPropertyOptions.None);

			max_read_pool_size = new ConfigurationProperty ("maxReadPoolSize",
				typeof (int), "64", null/* FIXME: get converter for int*/, null,
				ConfigurationPropertyOptions.None);

			max_write_pool_size = new ConfigurationProperty ("maxWritePoolSize",
				typeof (int), "16", null/* FIXME: get converter for int*/, null,
				ConfigurationPropertyOptions.None);

			reader_quotas = new ConfigurationProperty ("readerQuotas",
				typeof (XmlDictionaryReaderQuotasElement), null, null/* FIXME: get converter for XmlDictionaryReaderQuotasElement*/, null,
				ConfigurationPropertyOptions.None);

			write_encoding = new ConfigurationProperty ("writeEncoding",
				typeof (Encoding), "utf-8", null/* FIXME: get converter for Encoding*/, null,
				ConfigurationPropertyOptions.None);

			web_content_type_mapper_type = new ConfigurationProperty ("",
				typeof (string), null, null /* FIXME: supply */, null,
				ConfigurationPropertyOptions.None);

			properties.Add (binding_element_type);
			properties.Add (max_read_pool_size);
			properties.Add (max_write_pool_size);
			properties.Add (reader_quotas);
			properties.Add (write_encoding);
			properties.Add (web_content_type_mapper_type);
		}
开发者ID:nickchal,项目名称:pash,代码行数:34,代码来源:WebMessageEncodingElement.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Configuration.ConfigurationSection类代码示例发布时间:2022-05-26
下一篇:
C# Configuration.ConfigurationProperty类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap