Пример #1
0
 static PBKDF2Section()
 {
     _properties = new ConfigurationPropertyCollection();
     _properties.Add(_hashName);
     _properties.Add(_iterationCount);
     _properties.Add(_saltSize);
 }
		static ProtectedProviderSettings ()
		{
			providersProp = new ConfigurationProperty ("", typeof (ProviderSettingsCollection), null,
								   null, null, ConfigurationPropertyOptions.IsDefaultCollection);

			properties = new ConfigurationPropertyCollection ();
			properties.Add (providersProp);
		}
Пример #3
0
        static ServiceNameElement()
        {
            properties = new ConfigurationPropertyCollection();

            var t = typeof(ServiceNameElement);

            name = ConfigUtil.BuildProperty(t, "Name");

            properties.Add(name);
        }
Пример #4
0
        static XhtmlConformanceSection()
        {
            modeProp = new ConfigurationProperty("mode", typeof(XhtmlConformanceMode), XhtmlConformanceMode.Transitional,
                                                 new GenericEnumConverter(typeof(XhtmlConformanceMode)),
                                                 PropertyHelper.DefaultValidator,
                                                 ConfigurationPropertyOptions.None);
            properties = new ConfigurationPropertyCollection();

            properties.Add(modeProp);
        }
Пример #5
0
        static PeerCredentialElement()
        {
            properties  = new ConfigurationPropertyCollection();
            certificate = new ConfigurationProperty("certificate",
                                                    typeof(X509PeerCertificateElement), null, null /* FIXME: get converter for X509PeerCertificateElement*/, null,
                                                    ConfigurationPropertyOptions.None);

            message_sender_authentication = new ConfigurationProperty("messageSenderAuthentication",
                                                                      typeof(X509PeerCertificateAuthenticationElement), null, null /* FIXME: get converter for X509PeerCertificateAuthenticationElement*/, null,
                                                                      ConfigurationPropertyOptions.None);

            peer_authentication = new ConfigurationProperty("peerAuthentication",
                                                            typeof(X509PeerCertificateAuthenticationElement), null, null /* FIXME: get converter for X509PeerCertificateAuthenticationElement*/, null,
                                                            ConfigurationPropertyOptions.None);

            properties.Add(certificate);
            properties.Add(message_sender_authentication);
            properties.Add(peer_authentication);
        }
Пример #6
0
        static MemoryCacheElement()
        {
            // Property initialization
            s_properties = new ConfigurationPropertyCollection();

            s_propName =
                new ConfigurationProperty("name",
                                          typeof(string),
                                          null,
                                          new WhiteSpaceTrimStringConverter(),
                                          new StringValidator(1),
                                          ConfigurationPropertyOptions.IsRequired |
                                          ConfigurationPropertyOptions.IsKey);

            s_propPhysicalMemoryLimitPercentage =
                new ConfigurationProperty("physicalMemoryLimitPercentage",
                                          typeof(int),
                                          (int)0,
                                          null,
                                          new IntegerValidator(0, 100),
                                          ConfigurationPropertyOptions.None);

            s_propCacheMemoryLimitMegabytes =
                new ConfigurationProperty("cacheMemoryLimitMegabytes",
                                          typeof(int),
                                          (int)0,
                                          null,
                                          new IntegerValidator(0, int.MaxValue),
                                          ConfigurationPropertyOptions.None);

            s_propPollingInterval =
                new ConfigurationProperty("pollingInterval",
                                          typeof(TimeSpan),
                                          TimeSpan.FromMilliseconds(ConfigUtil.DefaultPollingTimeMilliseconds),
                                          new InfiniteTimeSpanConverter(),
                                          new PositiveTimeSpanValidator(),
                                          ConfigurationPropertyOptions.None);

            s_properties.Add(s_propName);
            s_properties.Add(s_propPhysicalMemoryLimitPercentage);
            s_properties.Add(s_propCacheMemoryLimitMegabytes);
            s_properties.Add(s_propPollingInterval);
        }
Пример #7
0
        public AccessControlElement()
        {
            _disableSpecificUserProperty = new ConfigurationProperty(
                "disableSpecificUser",
                typeof(bool),
                false,
                ConfigurationPropertyOptions.None);

            _properties.Add(_disableSpecificUserProperty);
        }
        static NetTcpSecurityElement()
        {
            properties = new ConfigurationPropertyCollection();
            message    = new ConfigurationProperty("message",
                                                   typeof(MessageSecurityOverTcpElement), null, null /* FIXME: get converter for MessageSecurityOverTcpElement*/, null,
                                                   ConfigurationPropertyOptions.None);

            mode = new ConfigurationProperty("mode",
                                             typeof(SecurityMode), "Transport", null /* FIXME: get converter for SecurityMode*/, null,
                                             ConfigurationPropertyOptions.None);

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

            properties.Add(message);
            properties.Add(mode);
            properties.Add(transport);
        }
Пример #9
0
        public QueryFileElement()
        {
            _queryFileFileNameProperty = new ConfigurationProperty(
                "filename",
                typeof(string),
                null,
                ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);

            _properties.Add(_queryFileFileNameProperty);
        }
        internal static ConfigurationPropertyCollection CreateBaseProperties()
        {
            ConfigurationPropertyCollection baseProperties = new ConfigurationPropertyCollection();

            foreach (ConfigurationProperty prop in properties)
            {
                baseProperties.Add(prop);
            }
            return(baseProperties);
        }
Пример #11
0
        static CodeSubDirectory()
        {
            directoryNameProp = new ConfigurationProperty("directoryName", typeof(string), "",
                                                          PropertyHelper.WhiteSpaceTrimStringConverter,
                                                          PropertyHelper.NonEmptyStringValidator,
                                                          ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);

            properties = new ConfigurationPropertyCollection();
            properties.Add(directoryNameProp);
        }
 private static ConfigurationPropertyCollection EnsureStaticPropertyBag()
 {
     if (_properties == null)
     {
         _property   = new ConfigurationProperty(null, typeof(TypeElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
         _properties = new ConfigurationPropertyCollection();
         _properties.Add(_property);
     }
     return(_properties);
 }
        static SqlCacheDependencyDatabase()
        {
            connectionStringNameProp = new ConfigurationProperty("connectionStringName", typeof(string), null,
                                                                 TypeDescriptor.GetConverter(typeof(string)),
                                                                 PropertyHelper.NonEmptyStringValidator,
                                                                 ConfigurationPropertyOptions.IsRequired);
            nameProp = new ConfigurationProperty("name", typeof(string), null,
                                                 TypeDescriptor.GetConverter(typeof(string)),
                                                 PropertyHelper.NonEmptyStringValidator,
                                                 ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
            pollTimeProp = new ConfigurationProperty("pollTime", typeof(int), 60000);
            properties   = new ConfigurationPropertyCollection();

            properties.Add(connectionStringNameProp);
            properties.Add(nameProp);
            properties.Add(pollTimeProp);

            elementProperty = new ConfigurationElementProperty(new CallbackValidator(typeof(SqlCacheDependencyDatabase), ValidateElement));
        }
        public SchedulingRuleElementCollection()
        {
            s_overrides = new ConfigurationProperty(
                "Overrides",
                typeof(bool),
                true);

            s_properties = new ConfigurationPropertyCollection();
            s_properties.Add(s_overrides);
        }
        static WsiProfilesElement()
        {
            nameProp = new ConfigurationProperty("name", typeof(WsiProfiles), WsiProfiles.None,
                                                 new GenericEnumConverter(typeof(WsiProfiles)),
                                                 null,
                                                 ConfigurationPropertyOptions.IsKey);
            properties = new ConfigurationPropertyCollection();

            properties.Add(nameProp);
        }
Пример #16
0
        static EnvironmentElement()
        {
            propertyName = new ConfigurationProperty(
                "name",
                typeof(string),
                null,
                ConfigurationPropertyOptions.IsRequired);

            propertyValue = new ConfigurationProperty(
                "value",
                typeof(string),
                null,
                ConfigurationPropertyOptions.IsRequired);

            properties = new ConfigurationPropertyCollection();

            properties.Add(propertyName);
            properties.Add(propertyValue);
        }
Пример #17
0
        static DiagnosticSection()
        {
            properties      = new ConfigurationPropertyCollection();
            message_logging = new ConfigurationProperty("messageLogging",
                                                        typeof(MessageLoggingElement), null, null /* FIXME: get converter for MessageLoggingElement*/, null,
                                                        ConfigurationPropertyOptions.None);

            performance_counters = new ConfigurationProperty("performanceCounters",
                                                             typeof(PerformanceCounterScope), "Off", null /* FIXME: get converter for PerformanceCounterScope*/, null,
                                                             ConfigurationPropertyOptions.None);

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

            properties.Add(message_logging);
            properties.Add(performance_counters);
            properties.Add(wmi_provider_enabled);
        }
Пример #18
0
        static NamedPipeConnectionPoolSettingsElement()
        {
            properties = new ConfigurationPropertyCollection();
            group_name = new ConfigurationProperty("groupName",
                                                   typeof(string), "default", new StringConverter(), null,
                                                   ConfigurationPropertyOptions.None);

            idle_timeout = new ConfigurationProperty("idleTimeout",
                                                     typeof(TimeSpan), "00:02:00", new TimeSpanConverter(), null,
                                                     ConfigurationPropertyOptions.None);

            max_outbound_connections_per_endpoint = new ConfigurationProperty("maxOutboundConnectionsPerEndpoint",
                                                                              typeof(int), "10", null /* FIXME: get converter for int*/, null,
                                                                              ConfigurationPropertyOptions.None);

            properties.Add(group_name);
            properties.Add(idle_timeout);
            properties.Add(max_outbound_connections_per_endpoint);
        }
        static PeerResolverElement()
        {
            properties = new ConfigurationPropertyCollection();
            custom     = new ConfigurationProperty("custom",
                                                   typeof(PeerCustomResolverElement), null, null /* FIXME: get converter for PeerCustomResolverElement*/, null,
                                                   ConfigurationPropertyOptions.None);

            mode = new ConfigurationProperty("mode",
                                             typeof(PeerResolverMode), "Auto", null /* FIXME: get converter for PeerResolverMode*/, null,
                                             ConfigurationPropertyOptions.None);

            referral_policy = new ConfigurationProperty("referralPolicy",
                                                        typeof(PeerReferralPolicy), "Service", null /* FIXME: get converter for PeerReferralPolicy*/, null,
                                                        ConfigurationPropertyOptions.None);

            properties.Add(custom);
            properties.Add(mode);
            properties.Add(referral_policy);
        }
        static SessionPageStateSection()
        {
            historySizeProp = new ConfigurationProperty("historySize", typeof(int), DefaultHistorySize,
                                                        TypeDescriptor.GetConverter(typeof(int)),
                                                        new IntegerValidator(1, Int32.MaxValue),
                                                        ConfigurationPropertyOptions.None);
            properties = new ConfigurationPropertyCollection();

            properties.Add(historySizeProp);
        }
        private static ConfigurationPropertyCollection EnsureStaticPropertyBag()
        {
            if (_properties == null)
            {
                ConfigurationProperty propFile          = new ConfigurationProperty("File", typeof(string), string.Empty, ConfigurationPropertyOptions.None);
                ConfigurationProperty propDisqusClients = new ConfigurationProperty("DisqusClients", typeof(DisqusClientElementCollection), null, ConfigurationPropertyOptions.None);

                ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
                properties.Add(propDisqusClients);
                properties.Add(propFile);


                _file          = propFile;
                _disqusClients = propDisqusClients;
                _properties    = properties;
            }

            return(_properties);
        }
Пример #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomProviderDataHelper{T}"/> class for a configuration object.
 /// </summary>
 public CustomProviderDataHelper(T helpedCustomProviderData)
 {
     propertiesCollection = new ConfigurationPropertyCollection();
     foreach (ConfigurationProperty propertyInfo in helpedCustomProviderData.Properties)
     {
         propertiesCollection.Add(propertyInfo);
     }
     this.helpedCustomProviderData
         = helpedCustomProviderData as IHelperAssistedCustomConfigurationData <T>;
 }
Пример #23
0
        static NamespaceInfo()
        {
            namespaceProp = new ConfigurationProperty("namespace", typeof(string), null,
                                                      TypeDescriptor.GetConverter(typeof(string)),
                                                      PropertyHelper.NonEmptyStringValidator,
                                                      ConfigurationPropertyOptions.None);
            properties = new ConfigurationPropertyCollection();

            properties.Add(namespaceProp);
        }
Пример #24
0
        static WebControlsSection()
        {
            clientScriptsLocationProp = new ConfigurationProperty("clientScriptsLocation", typeof(string), "/aspnet_client/{0}/{1}/",
                                                                  TypeDescriptor.GetConverter(typeof(string)),
                                                                  PropertyHelper.NonEmptyStringValidator,
                                                                  ConfigurationPropertyOptions.IsRequired);
            properties = new ConfigurationPropertyCollection();

            properties.Add(clientScriptsLocationProp);
        }
Пример #25
0
        static X509RecipientCertificateClientElement()
        {
            properties     = new ConfigurationPropertyCollection();
            authentication = new ConfigurationProperty("authentication",
                                                       typeof(X509ServiceCertificateAuthenticationElement), null, null /* FIXME: get converter for X509ServiceCertificateAuthenticationElement*/, null,
                                                       ConfigurationPropertyOptions.None);

            default_certificate = new ConfigurationProperty("defaultCertificate",
                                                            typeof(X509DefaultServiceCertificateElement), null, null /* FIXME: get converter for X509DefaultServiceCertificateElement*/, null,
                                                            ConfigurationPropertyOptions.None);

            scoped_certificates = new ConfigurationProperty("scopedCertificates",
                                                            typeof(X509ScopedServiceCertificateElementCollection), null, null /* FIXME: get converter for X509ScopedServiceCertificateElementCollection*/, null,
                                                            ConfigurationPropertyOptions.None);

            properties.Add(authentication);
            properties.Add(default_certificate);
            properties.Add(scoped_certificates);
        }
Пример #26
0
 /// <summary>
 /// Static constructor prepares the property collection.
 /// </summary>
 static ConnectionElement()
 {
     s_properties = new ConfigurationPropertyCollection();
     s_properties.Add(s_propName);
     s_properties.Add(s_propAffiliate);
     s_properties.Add(s_propUserId);
     s_properties.Add(s_propPassword);
     s_properties.Add(s_propConnectionTemplate);
     s_properties.Add(s_propRetryConnectionCount);
     s_properties.Add(s_propRetryIntervalInMilliseconds);
     s_properties.Add(s_propDbConnectionProvider);
 }
        static ReportTypesElementSection()
        {
            s_fields = new ConfigurationProperty(
                "",
                typeof(ReportTypesElementCollection),
                null,
                ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsDefaultCollection);

            s_properties = new ConfigurationPropertyCollection();
            s_properties.Add(s_fields);
        }
Пример #28
0
 static ProfilePropertySettings()
 {
     // Property initialization
     _properties = new ConfigurationPropertyCollection();
     _properties.Add(_propName);
     _properties.Add(_propReadOnly);
     _properties.Add(_propSerializeAs);
     _properties.Add(_propProviderName);
     _properties.Add(_propDefaultValue);
     _properties.Add(_propType);
     _properties.Add(_propAllowAnonymous);
     _properties.Add(_propCustomProviderData);
 }
Пример #29
0
        static AuthorizationRule()
        {
            rolesProp = new ConfigurationProperty("roles", typeof(StringCollection), null,
                                                  PropertyHelper.CommaDelimitedStringCollectionConverter,
                                                  PropertyHelper.DefaultValidator,
                                                  ConfigurationPropertyOptions.None);
            usersProp = new ConfigurationProperty("users", typeof(StringCollection), null,
                                                  PropertyHelper.CommaDelimitedStringCollectionConverter,
                                                  PropertyHelper.DefaultValidator,
                                                  ConfigurationPropertyOptions.None);
            verbsProp = new ConfigurationProperty("verbs", typeof(StringCollection), null,
                                                  PropertyHelper.CommaDelimitedStringCollectionConverter,
                                                  PropertyHelper.DefaultValidator,
                                                  ConfigurationPropertyOptions.None);
            properties = new ConfigurationPropertyCollection();

            properties.Add(rolesProp);
            properties.Add(usersProp);
            properties.Add(verbsProp);
        }
Пример #30
0
 static LoggerProfileSection()
 {
     _propSettings =
         new ConfigurationProperty(null,
                                   typeof(LoggerProfileSettingsCollection),
                                   null,
                                   ConfigurationPropertyOptions.IsDefaultCollection);
     _properties = new ConfigurationPropertyCollection();
     _properties.Clear();
     _properties.Add(_propSettings);
 }
 /// <summary>
 /// Initializes <see cref="DisasterLayerUrlsConfigurationSection"/> class.
 /// </summary>
 static DisasterLayerUrlsConfigurationSection()
 {
     UrlsCollectionProperty = new ConfigurationProperty(
         String.Empty,
         typeof (DisasterMapUrlsCollection),
         null,
         ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsDefaultCollection
         );
     properties = new ConfigurationPropertyCollection();
     properties.Add(UrlsCollectionProperty);
 }
Пример #32
0
        static HttpHandlersSection()
        {
            handlersProp = new ConfigurationProperty("", typeof(HttpHandlerActionCollection), null,
                                                     null, PropertyHelper.DefaultValidator,
                                                     ConfigurationPropertyOptions.IsDefaultCollection);


            properties = new ConfigurationPropertyCollection();

            properties.Add(handlersProp);
        }
 public ProtectedProviderSettings()
 {
     // Property initialization
     _properties = new ConfigurationPropertyCollection();
     _properties.Add(_propProviders);
 }
Пример #34
0
Файл: test.cs Проект: mono/gert
	static CustomConfigSection ()
	{
		modeProp = new ConfigurationProperty ("mode", typeof (string), "RemoteOnly");
		properties = new ConfigurationPropertyCollection ();
		properties.Add (modeProp);
	}