X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web.Configuration_2.0%2FTagPrefixInfo.cs;h=ef417df2456742a201966ed63e283171742bf469;hb=9887d4c832109f633cc420014887ce88249b7f7c;hp=fda4da93ad4c1ce1970a413658f2c02d3691df72;hpb=6cfd2055426c190ca2f6a9f8ca3af2da6f6a79d0;p=mono.git diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/TagPrefixInfo.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/TagPrefixInfo.cs index fda4da93ad4..ef417df2456 100644 --- a/mcs/class/System.Web/System.Web.Configuration_2.0/TagPrefixInfo.cs +++ b/mcs/class/System.Web/System.Web.Configuration_2.0/TagPrefixInfo.cs @@ -47,9 +47,14 @@ namespace System.Web.Configuration static ConfigurationProperty tagNameProp; static ConfigurationProperty sourceProp; + static ConfigurationElementProperty elementProperty; + static TagPrefixInfo () { - tagPrefixProp = new ConfigurationProperty ("tagPrefix", typeof (string), "/", ConfigurationPropertyOptions.IsRequired); + tagPrefixProp = new ConfigurationProperty ("tagPrefix", typeof (string), "/", + TypeDescriptor.GetConverter (typeof (string)), + PropertyHelper.NonEmptyStringValidator, + ConfigurationPropertyOptions.IsRequired); namespaceProp = new ConfigurationProperty ("namespace", typeof (string)); assemblyProp = new ConfigurationProperty ("assembly", typeof (string)); tagNameProp = new ConfigurationProperty ("tagName", typeof (string)); @@ -61,6 +66,12 @@ namespace System.Web.Configuration properties.Add (assemblyProp); properties.Add (tagNameProp); properties.Add (sourceProp); + + elementProperty = new ConfigurationElementProperty (new CallbackValidator (typeof (TagPrefixInfo), ValidateElement)); + } + + internal TagPrefixInfo () + { } public TagPrefixInfo (string tagPrefix, string nameSpace, string assembly, string tagName, string source) @@ -72,6 +83,16 @@ namespace System.Web.Configuration this.Source = source; } + [MonoTODO] + static void ValidateElement (object o) + { + /* XXX do some sort of element validation here? */ + } + + protected override ConfigurationElementProperty ElementProperty { + get { return elementProperty; } + } + public override bool Equals (object prefix) { TagPrefixInfo info = prefix as TagPrefixInfo; @@ -95,13 +116,6 @@ namespace System.Web.Configuration set { base[assemblyProp] = value; } } -#if notyet - [MonoTODO] - protected override ConfigurationElementProperty ElementProperty { - get { return base.ElementProperty; } - } -#endif - [ConfigurationProperty ("namespace")] public string Namespace { get { return (string) base[namespaceProp]; }