static FormsAuthConfigurationSection() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propEnabled); _properties.Add(_propUseIISUser); }
public TypedElement(Type baseType) : base() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propTypeName); _properties.Add(_propInitData); _baseType = baseType; }
static NameValueConfigurationElement() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propValue); }
private static ConfigurationPropertyCollection BuildProperties() { ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); properties.Add(_propEnabled); properties.Add(_propEnableForReading); properties.Add(_propEnableForWriting); return properties; }
static CacheSection () { disableExpirationProp = new ConfigurationProperty("disableExpiration", typeof (bool), false); disableMemoryCollectionProp = new ConfigurationProperty("disableMemoryCollection", typeof (bool), false); percentagePhysicalMemoryUsedLimitProp = new ConfigurationProperty("percentagePhysicalMemoryUsedLimit", typeof (int), 0, TypeDescriptor.GetConverter (typeof (int)), PropertyHelper.IntFromZeroToMaxValidator, ConfigurationPropertyOptions.None); privateBytesLimitProp = new ConfigurationProperty("privateBytesLimit", typeof (long), 0L, TypeDescriptor.GetConverter (typeof (long)), new LongValidator (0, Int64.MaxValue), ConfigurationPropertyOptions.None); privateBytesPollTimeProp = new ConfigurationProperty("privateBytesPollTime", typeof (TimeSpan), TimeSpan.FromMinutes (2), PropertyHelper.InfiniteTimeSpanConverter, PropertyHelper.PositiveTimeSpanValidator, ConfigurationPropertyOptions.None); properties = new ConfigurationPropertyCollection(); properties.Add (disableExpirationProp); properties.Add (disableMemoryCollectionProp); properties.Add (percentagePhysicalMemoryUsedLimitProp); properties.Add (privateBytesLimitProp); properties.Add (privateBytesPollTimeProp); }
static SiteMapSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propDefaultProvider); _properties.Add(_propEnabled); _properties.Add(_propProviders); }
static TemplateElement() { _Properties = new ConfigurationPropertyCollection(); _Properties.Add(_Name); _Properties.Add(_Path); }
static TraceSection() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propListeners); _properties.Add(_propAutoFlush); _properties.Add(_propIndentSize); _properties.Add(_propUseGlobalLock); }
public ProviderSettings() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propType); _PropertyNameCollection = null; }
static ConnectionStringSettings() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propConnectionString); _properties.Add(_propProviderName); }
static WebPartsPersonalization() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propDefaultProvider); _properties.Add(_propProviders); _properties.Add(_propAuthorization); }
static SqlCacheDependencyDatabase() { // Property initialization _properties = new ConfigurationPropertyCollection(); _propName = new ConfigurationProperty("name", typeof(string), null, null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); _propConnectionStringName = new ConfigurationProperty("connectionStringName", typeof(string), null, null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired); _propPollTime = new ConfigurationProperty("pollTime", typeof(int), 60000, ConfigurationPropertyOptions.None); _properties.Add(_propName); _properties.Add(_propConnectionStringName); _properties.Add(_propPollTime); }
static MachineKeySection () { decryptionProp = new ConfigurationProperty ("decryption", typeof (string), "Auto", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); decryptionKeyProp = new ConfigurationProperty ("decryptionKey", typeof (string), "AutoGenerate,IsolateApps", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); validationProp = new ConfigurationProperty ("validation", typeof (string), "HMACSHA256", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); validationKeyProp = new ConfigurationProperty ("validationKey", typeof (string), "AutoGenerate,IsolateApps", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); properties = new ConfigurationPropertyCollection (); properties.Add (decryptionProp); properties.Add (decryptionKeyProp); properties.Add (validationProp); properties.Add (validationKeyProp); Config.AutoGenerate (MachineKeyRegistryStorage.KeyType.Encryption); Config.AutoGenerate (MachineKeyRegistryStorage.KeyType.Validation); }
private static ConfigurationPropertyCollection BuildProperties() { ConfigurationPropertyCollection props = new ConfigurationPropertyCollection(); props.Add(_propConverters); props.Add(_propRecursionLimitLimit); props.Add(_propMaxJsonLength); return props; }
static ProtectedConfigurationSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propProviders); _properties.Add(_propDefaultProvider); }
/// <summary> /// Initializes the <see cref="CacheRegionElement"/> class. /// </summary> static CommandCacheDependencyElement() { //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 commandProperty = new ConfigurationProperty("command", typeof (string), String.Empty, ConfigurationPropertyOptions.IsRequired); properties.Add(commandProperty); var connectionNameProperty = new ConfigurationProperty("connectionName", typeof (string), String.Empty, ConfigurationPropertyOptions.None); properties.Add(connectionNameProperty); var isSprocProperty = new ConfigurationProperty("isStoredProcedure", typeof (bool), false, ConfigurationPropertyOptions.None); properties.Add(isSprocProperty); var providerTypeProperty = new ConfigurationProperty("connectionStringProviderType", typeof (System.Type), null, new TypeNameConverter(), new SubclassTypeValidator(typeof (IConnectionStringProvider)), ConfigurationPropertyOptions.None); properties.Add(providerTypeProperty); }
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); }
/* <!-- httpCookies Attributes: httpOnlyCookies="[true|false]" - enables output of the "HttpOnly" cookie attribute requireSSL="[true|false]" - enables output of the "secure" cookie attribute as described in RFC 2109 domain="[domain]" - enables output of the "domain" cookie attribute set to the specified value --> <httpCookies httpOnlyCookies="false" requireSSL="false" /> */ static HttpCookiesSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propHttpOnlyCookies); _properties.Add(_propRequireSSL); _properties.Add(_propDomain); }
static IdentitySection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propImpersonate); _properties.Add(_propUserName); _properties.Add(_propPassword); }
/// <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); }
/// <summary> /// Predefines the valid properties and prepares /// the property collection. /// </summary> static ConnectionElement() { // Predefine properties here s_propName = new ConfigurationProperty( "name", typeof(string), null, ConfigurationPropertyOptions.IsRequired ); s_propCS = new ConfigurationProperty( "connectionString", typeof(string), null, ConfigurationPropertyOptions.IsRequired ); s_propType = new ConfigurationProperty( "type", typeof(string), "SqlServer", ConfigurationPropertyOptions.None ); s_properties = new ConfigurationPropertyCollection(); s_properties.Add(s_propName); s_properties.Add(s_propCS); s_properties.Add(s_propType); }
/// <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); }
static MachineKeySection () { decryptionProp = new ConfigurationProperty ("decryption", typeof (string), "Auto", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); decryptionKeyProp = new ConfigurationProperty ("decryptionKey", typeof (string), "AutoGenerate,IsolateApps", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); validationProp = new ConfigurationProperty ("validation", typeof (MachineKeyValidation), MachineKeyValidation.SHA1, new MachineKeyValidationConverter (), PropertyHelper.DefaultValidator, ConfigurationPropertyOptions.None); validationKeyProp = new ConfigurationProperty ("validationKey", typeof (string), "AutoGenerate,IsolateApps", PropertyHelper.WhiteSpaceTrimStringConverter, PropertyHelper.NonEmptyStringValidator, ConfigurationPropertyOptions.None); properties = new ConfigurationPropertyCollection (); properties.Add (decryptionProp); properties.Add (decryptionKeyProp); properties.Add (validationProp); properties.Add (validationKeyProp); MachineKeySectionUtils.AutoGenKeys (); }
static HttpHandlerAction() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propPath); _properties.Add(_propVerb); _properties.Add(_propType); _properties.Add(_propValidate); }
static ContractTypeNameElement () { name = new ConfigurationProperty ("name", typeof (string), null, null, new StringValidator (0), ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); @namespace = new ConfigurationProperty ("namespace", typeof (string), "http://tempuri.org/", null, null, ConfigurationPropertyOptions.IsKey); properties = new ConfigurationPropertyCollection (); properties.Add (name); properties.Add (@namespace); }
static EventMappingSettings() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propType); _properties.Add(_propStartEventCode); _properties.Add(_propEndEventCode); }
static DiscoveryClientElement () { endpoint = new ConfigurationProperty ("endpoint", typeof (ChannelEndpointElement), null, null, null, ConfigurationPropertyOptions.None); find_criteria = new ConfigurationProperty ("findCriteria", typeof (FindCriteriaElement), null, null, null, ConfigurationPropertyOptions.None); properties = new ConfigurationPropertyCollection (); properties.Add (endpoint); properties.Add (find_criteria); }
static AnnouncementEndpointElement () { discovery_version = new ConfigurationProperty ("discoveryVersion", typeof (DiscoveryVersion), "WSDiscovery11", new DiscoveryVersionConverter (), null, ConfigurationPropertyOptions.None); max_announcement_delay = new ConfigurationProperty ("maxAnnouncementDelay", typeof (TimeSpan), "00:00:00", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None); properties = new ConfigurationPropertyCollection (); properties.Add (discovery_version); properties.Add (max_announcement_delay); }
static SourceElement() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propName); _properties.Add(_propSwitchName); _properties.Add(_propSwitchValue); _properties.Add(_propSwitchType); _properties.Add(_propListeners); }
static SchemaImporterExtensionElement () { properties = new ConfigurationPropertyCollection (); name = new ConfigurationProperty ("name", typeof (string), "", ConfigurationPropertyOptions.IsKey | ConfigurationPropertyOptions.IsRequired); type = new ConfigurationProperty ("type", typeof (Type), null, ConfigurationPropertyOptions.IsRequired); properties.Add (name); properties.Add (type); }
static ClientSettingsSection() { settings_prop = new ConfigurationProperty( "", typeof(SettingElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); properties = new ConfigurationPropertyCollection(); properties.Add(settings_prop); }
private void SetProperty(string propName, string value) { ConfigurationProperty setPropName; if (_properties.Contains(propName)) { setPropName = _properties[propName]; } else { setPropName = new ConfigurationProperty(propName, typeof(string), null); _properties.Add(setPropName); } if (setPropName == null) { return; } base[setPropName] = value; }
internal ConfigurationRemoveElement(ConfigurationElement origElement, ConfigurationElementCollection origCollection) { _origElement = origElement; _origCollection = origCollection; foreach (ConfigurationProperty p in origElement.Properties) { if (p.IsKey) { properties.Add(p); } } }
private bool SetProperty(string PropName, string value) { ConfigurationProperty SetPropName = null; if (_properties.Contains(PropName)) { SetPropName = _properties[PropName]; } else { SetPropName = new ConfigurationProperty(PropName, typeof(string), null); _properties.Add(SetPropName); } if (SetPropName != null) { base[SetPropName] = value; // Parameters[PropName] = value; return(true); } else { return(false); } }
internal ConfigurationPropertyCollection GetKeyProperties() { if (keyProps != null) { return(keyProps); } ConfigurationPropertyCollection tmpkeyProps = new ConfigurationPropertyCollection(); foreach (ConfigurationProperty prop in Properties) { if (prop.IsKey) { tmpkeyProps.Add(prop); } } return(keyProps = tmpkeyProps); }
public ElementMap(Type t) { Properties = new ConfigurationPropertyCollection(); CollectionAttribute = t.GetTypeInfo().GetCustomAttribute(typeof(ConfigurationCollectionAttribute)) as ConfigurationCollectionAttribute; PropertyInfo[] props = t.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance); foreach (var prop in props) { var at = prop.GetCustomAttribute(typeof(ConfigurationPropertyAttribute)) as ConfigurationPropertyAttribute; if (at == null) { continue; } string name = at.Name != null ? at.Name : prop.Name; var validatorAttr = prop.GetCustomAttribute(typeof(ConfigurationValidatorAttribute)) as ConfigurationValidatorAttribute; var validator = validatorAttr != null ? validatorAttr.ValidatorInstance : null; var convertAttr = (TypeConverterAttribute)prop.GetCustomAttribute(typeof(TypeConverterAttribute)); var converter = convertAttr != null ? (TypeConverter)Activator.CreateInstance(Type.GetType(convertAttr.ConverterTypeName), true) : null; var cp = new ConfigurationProperty(name, prop.PropertyType, at.DefaultValue, converter, validator, at.Options); cp.CollectionAttribute = prop.GetCustomAttribute(typeof(ConfigurationCollectionAttribute)) as ConfigurationCollectionAttribute; Properties.Add(cp); } }
static ClientSettingsSection() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propSettings); }
static IdnElement() { enabled_prop = new ConfigurationProperty("enabled", typeof(UriIdnScope), UriIdnScope.None, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); properties = new ConfigurationPropertyCollection(); properties.Add(enabled_prop); }
static ProtectedConfigurationSection() { _properties.Add(_propProviders); _properties.Add(_propDefaultProvider); }
static ConfigurationBuildersSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propBuilders); }
static IriParsingElement() { enabled_prop = new ConfigurationProperty("enabled", typeof(bool), false, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey); properties = new ConfigurationPropertyCollection(); properties.Add(enabled_prop); }
static ConnectionStringsSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propConnectionStrings); }
public ProtectedProviderSettings() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propProviders); }
static SchemeSettingElement() { properties.Add(name); properties.Add(genericUriParserOptions); }
static UriSection() { properties.Add(idn); properties.Add(iriParsing); properties.Add(schemeSettings); }
static KeyValueConfigurationElement() { _properties.Add(_propKey); _properties.Add(_propValue); }
static ClientSettingsSection() { _properties.Add(_propSettings); }
static ConnectionStringsSection() { _properties.Add(_propConnectionStrings); }
static DateTimeConfigurationElement() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propValue); }
static SettingElement() { _properties.Add(_propName); _properties.Add(_propSerializeAs); _properties.Add(_propValue); }
static ConnectionStringSettings() { _properties.Add(_propName); _properties.Add(_propConnectionString); _properties.Add(_propProviderName); }
static NameValueConfigurationElement() { _properties.Add(_propName); _properties.Add(_propValue); }