|
|
@@ -49,13 +49,23 @@ namespace System.Web.Configuration {
|
|
|
|
|
|
static BufferModeSettings ()
|
|
|
{
|
|
|
- maxBufferSizeProp = new ConfigurationProperty ("maxBufferSize", typeof (int), Int32.MaxValue, ConfigurationPropertyOptions.IsRequired);
|
|
|
- maxBufferThreadsProp = new ConfigurationProperty ("maxBufferThreads", typeof (int), 1);
|
|
|
- maxFlushSizeProp = new ConfigurationProperty ("maxFlushSize", typeof (int), Int32.MaxValue, ConfigurationPropertyOptions.IsRequired);
|
|
|
- nameProp = new ConfigurationProperty ("name", typeof (string), "", ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
|
|
|
- regularFlushIntervalProp = new ConfigurationProperty ("regularFlushInterval", typeof (TimeSpan), TimeSpan.FromSeconds (1), ConfigurationPropertyOptions.IsRequired);
|
|
|
- urgentFlushIntervalProp = new ConfigurationProperty ("urgentFlushInterval", typeof (TimeSpan), TimeSpan.FromSeconds (0), ConfigurationPropertyOptions.IsRequired);
|
|
|
- urgentFlushThresholdProp = new ConfigurationProperty ("urgentFlushThreshold", typeof (int), Int32.MaxValue, ConfigurationPropertyOptions.IsRequired);
|
|
|
+ InfiniteIntConverter infIntCvt = new InfiniteIntConverter ();
|
|
|
+ IntegerValidator iv = new IntegerValidator (1, Int32.MaxValue);
|
|
|
+ InfiniteTimeSpanConverter infTSCvt = new InfiniteTimeSpanConverter ();
|
|
|
+
|
|
|
+ maxBufferSizeProp = new ConfigurationProperty ("maxBufferSize", typeof (int), Int32.MaxValue, infIntCvt, iv, ConfigurationPropertyOptions.IsRequired);
|
|
|
+ maxBufferThreadsProp = new ConfigurationProperty ("maxBufferThreads", typeof (int), 1, infIntCvt, iv, ConfigurationPropertyOptions.None);
|
|
|
+ maxFlushSizeProp = new ConfigurationProperty ("maxFlushSize", typeof (int), Int32.MaxValue, infIntCvt, iv, ConfigurationPropertyOptions.IsRequired);
|
|
|
+ nameProp = new ConfigurationProperty ("name", typeof (string), "", null, new StringValidator (1), ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
|
|
|
+ regularFlushIntervalProp = new ConfigurationProperty ("regularFlushInterval", typeof (TimeSpan), TimeSpan.FromSeconds (1),
|
|
|
+ infTSCvt, new TimeSpanValidator (TimeSpan.Zero, TimeSpan.MaxValue),
|
|
|
+ ConfigurationPropertyOptions.IsRequired);
|
|
|
+ urgentFlushIntervalProp = new ConfigurationProperty ("urgentFlushInterval", typeof (TimeSpan), TimeSpan.FromSeconds (0),
|
|
|
+ infTSCvt, null,
|
|
|
+ ConfigurationPropertyOptions.IsRequired);
|
|
|
+ urgentFlushThresholdProp = new ConfigurationProperty ("urgentFlushThreshold", typeof (int), Int32.MaxValue,
|
|
|
+ infIntCvt, iv,
|
|
|
+ ConfigurationPropertyOptions.IsRequired);
|
|
|
properties = new ConfigurationPropertyCollection ();
|
|
|
|
|
|
properties.Add (maxBufferSizeProp);
|