Browse Source

2005-11-23 Chris Toshok <[email protected]>

	* ProfilePropertyNameValidator.cs: new implementation.
	
	* ProfilePropertySettings.cs, ProfileGroupSettings.cs,
	ClientTargetSection.cs, ClientTargetSection.cs,
	BufferModeSettings.cs, HttpModulesSection.cs,
	WebPartsPersonalization.cs, TransformerInfo.cs, TrustLevel.cs,
	NamespaceInfo.cs, SqlCacheDependencyDatabase.cs,
	AuthenticationSection.cs, RuleSettings.cs,
	FormsAuthenticationUser.cs, WebPartsSection.cs, BuildProvider.cs,
	WebPartsPersonalizationAuthorization.cs, Compiler.cs,
	ExpressionBuilder.cs, OutputCacheProfile.cs,
	FormsAuthenticationCredentials.cs, XhtmlConformanceSection.cs,
	OutputCacheSettingsSection.cs, CustomError.cs, TraceSection.cs,
	ExpressionBuilderCollection.cs, ProfileSettings.cs,
	SessionStateSection.cs, HealthMonitoringSection.cs,
	FormsAuthenticationConfiguration.cs, HttpRuntimeSection.cs,
	SessionPageStateSection.cs, TrustSection.cs,
	AnonymousIdentificationSection.cs, WebControlsSection.cs,
	ClientTarget.cs, TagMapInfo.cs, AuthorizationSection.cs,
	ProcessModelSection.cs, RoleManagerSection.cs,
	MembershipSection.cs, CustomErrorsSection.cs (..cctor): fix
	validator/converters.
	
	* MachineKeySection.cs (..cctor): fix validators/converters.
	(Validation): enable the Converter.
	
	* CodeSubDirectory.cs (..cctor): fix validator/converters.
	(DirectoryName): add note about missing validator decoration.
	
	* HttpModuleAction.cs (..cctor): init properties.
	(Properties): return properties.
	
	* CompilationSection.cs (..cctor): fix validator/converters.
	(GetInstance): add in this pre-2.0 interface for the time being,
	hopefully it'll make it easier to migrate later on.
	
	* HttpHandlerActionCollection.cs (..cctor): init properties.
	(Properties): return properties.

	* PagesSection.cs (..cctor): fix validator/converters.
	(GetInstance): add in this pre-2.0 interface for the time being,
	hopefully it'll make it easier to migrate later on.
	
	* HttpHandlersSection.cs (..cctor): init properties.
	(Properties): return properties.
	
	* EventMappingSettings.cs (..cctor): fix validator/converters.
	(Name): add note about missing validator decoration.
	
	* HttpHandlerAction.cs (..cctor): fix validator/converters.
	(PAth, Type, Verb): add note about missing validator decoration.

	* NamespaceCollection.cs (..cctor): fix properties.

	* ProfilePropertySettingsCollection.cs (..cctor): init properties.
	(..ctor): don't throw NIE.
	(Properties): return properties.

	* HttpModuleActionCollection.cs (..cctor): init properties.
	(Properties): return properties.

	* CacheSection.cs (..cctor): fix validators/converters.
	(PrivateBytesPollTime): add note about missing validator
	decoration.

	* AuthorizationRule.cs (..cctor): fix validators/converters.
	(Roles, Users, Verbs): enable the TypeConverter decorations.
	
	* UrlMapping.cs (ValidateUrl): static method for use as a
	validation callback.  unimplemented as yet.
	(..cctor): fix validators/converters.
	(MappedUrl): add note about missing validator decoration.
	
	* PropertyHelper.cs: static utility class which contains
	references to validators and converters for use in static
	constructors (building the Properties arrays).


svn path=/trunk/mcs/; revision=53429
Chris Toshok 20 years ago
parent
commit
26bb07e71e

+ 39 - 6
mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs

@@ -58,16 +58,29 @@ namespace System.Web.Configuration
 
 		static CompilationSection ()
 		{
-			assembliesProp = new ConfigurationProperty ("assemblies", typeof (AssemblyCollection), null);
+			assembliesProp = new ConfigurationProperty ("assemblies", typeof (AssemblyCollection), null,
+								    null, PropertyHelper.DefaultValidator,
+								    ConfigurationPropertyOptions.None);
 			assemblyPostProcessorTypeProp = new ConfigurationProperty ("assemblyPostProcessorType", typeof (string), "");
 			batchProp = new ConfigurationProperty ("batch", typeof (bool), true);
-			buildProvidersProp = new ConfigurationProperty ("buidProviders", typeof (BuildProviderCollection), null);
-			batchTimeoutProp = new ConfigurationProperty ("batchTimeout", typeof (TimeSpan), new TimeSpan (0, 15, 0));
-			codeSubDirectoriesProp = new ConfigurationProperty ("codeSubDirectories", typeof (CodeSubDirectoriesCollection), null);
-			compilersProp = new ConfigurationProperty ("compilers", typeof (CompilerCollection), null);
+			buildProvidersProp = new ConfigurationProperty ("buidProviders", typeof (BuildProviderCollection), null,
+									null, PropertyHelper.DefaultValidator,
+									ConfigurationPropertyOptions.None);
+			batchTimeoutProp = new ConfigurationProperty ("batchTimeout", typeof (TimeSpan), new TimeSpan (0, 15, 0),
+								      PropertyHelper.TimeSpanSecondsOrInfiniteConverter,
+								      PropertyHelper.PositiveTimeSpanValidator,
+								      ConfigurationPropertyOptions.None);
+			codeSubDirectoriesProp = new ConfigurationProperty ("codeSubDirectories", typeof (CodeSubDirectoriesCollection), null,
+									    null, PropertyHelper.DefaultValidator,
+									    ConfigurationPropertyOptions.None);
+			compilersProp = new ConfigurationProperty ("compilers", typeof (CompilerCollection), null,
+								   null, PropertyHelper.DefaultValidator,
+								   ConfigurationPropertyOptions.None);
 			debugProp = new ConfigurationProperty ("debug", typeof (bool), false);
 			defaultLanguageProp = new ConfigurationProperty ("defaultLanguage", typeof (string), "vb");
-			expressionBuildersProp = new ConfigurationProperty ("expressionBuilders", typeof (ExpressionBuilderCollection), null);
+			expressionBuildersProp = new ConfigurationProperty ("expressionBuilders", typeof (ExpressionBuilderCollection), null,
+									    null, PropertyHelper.DefaultValidator,
+									    ConfigurationPropertyOptions.None);
 			explicitProp = new ConfigurationProperty ("explicit", typeof (bool), true);
 			maxBatchSizeProp = new ConfigurationProperty ("maxBatchSize", typeof (int), 1000);
 			maxBatchGeneratedFileSizeProp = new ConfigurationProperty ("maxBatchGeneratedFileSize", typeof (int), 3000);
@@ -214,6 +227,26 @@ namespace System.Web.Configuration
 		protected override ConfigurationPropertyCollection Properties {
 			get { return properties; }
 		}
+
+#region CompatabilityCode
+		[MonoTODO ("we really shouldn't need this..")]
+		internal static CompilationSection GetInstance ()
+		{
+			CompilationSection config;
+
+			if (HttpContext.Current != null) {
+				config = WebConfigurationManager.GetSection ("system.web/compilation") as CompilationSection;
+				if (config == null)
+					throw new Exception ("Configuration error.");
+			} else {
+				// empty config (as used in unit tests)
+				config = new CompilationSection ();
+			}
+
+			return config;
+		}
+#endregion
+
 	}
 }
 #endif // NET_2_0

+ 8 - 4
mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlersSection.cs

@@ -37,6 +37,13 @@ namespace System.Web.Configuration
 {
 	public sealed class HttpHandlersSection: ConfigurationSection
 	{
+		static ConfigurationPropertyCollection properties;
+
+		static HttpHandlersSection ()
+		{
+			properties = new ConfigurationPropertyCollection ();
+		}
+
 		public HttpHandlersSection ()
 		{
 		}
@@ -49,11 +56,8 @@ namespace System.Web.Configuration
 			}
 		}
 
-		[MonoTODO]
 		protected override ConfigurationPropertyCollection Properties {
-			get {
-				throw new NotImplementedException ();
-			}
+			get { return properties; }
 		}
 	}
 }

+ 4 - 1
mcs/class/System.Web/System.Web.Configuration_2.0/XhtmlConformanceSection.cs

@@ -42,7 +42,10 @@ namespace System.Web.Configuration {
 
 		static XhtmlConformanceSection ()
 		{
-			modeProp = new ConfigurationProperty ("mode", typeof (XhtmlConformanceMode), XhtmlConformanceMode.Transitional);
+			modeProp = new ConfigurationProperty ("mode", typeof (XhtmlConformanceMode), XhtmlConformanceMode.Transitional,
+							      new GenericEnumConverter (typeof (XhtmlConformanceMode)),
+							      PropertyHelper.DefaultValidator,
+							      ConfigurationPropertyOptions.None);
 			properties = new ConfigurationPropertyCollection ();
 
 			properties.Add (modeProp);