2007-05-06 Igor Zelmanovich <igorz@mainsoft.com>
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / SqlCacheDependencyDatabase.cs
index d233fefd43de58ad71fe4219cd4f29db931cc6d2..719a40e58aff036ea44c40970045f818818e9834 100644 (file)
@@ -43,6 +43,8 @@ namespace System.Web.Configuration {
                static ConfigurationProperty pollTimeProp;
                static ConfigurationPropertyCollection properties;
 
+               static ConfigurationElementProperty elementProperty;
+
                static SqlCacheDependencyDatabase ()
                {
                        connectionStringNameProp = new ConfigurationProperty ("connectionStringName", typeof (string), null,
@@ -59,6 +61,8 @@ namespace System.Web.Configuration {
                        properties.Add (connectionStringNameProp);
                        properties.Add (nameProp);
                        properties.Add (pollTimeProp);
+
+                       elementProperty = new ConfigurationElementProperty (new CallbackValidator (typeof (SqlCacheDependencyDatabase), ValidateElement));
                }
 
                internal SqlCacheDependencyDatabase ()
@@ -78,6 +82,15 @@ namespace System.Web.Configuration {
                        this.PollTime = pollTime;
                }
 
+               static void ValidateElement (object o)
+               {
+                       /* XXX do some sort of element validation here? */
+               }
+
+               protected override ConfigurationElementProperty ElementProperty {
+                       get { return elementProperty; }
+               }
+
                [StringValidator (MinLength = 1)]
                [ConfigurationProperty ("connectionStringName", Options = ConfigurationPropertyOptions.IsRequired)]
                public string ConnectionStringName {
@@ -85,12 +98,6 @@ namespace System.Web.Configuration {
                        set { base[connectionStringNameProp] = value; }
                }
 
-#if notyet
-               protected override ConfigurationElementProperty ElementProperty {
-                       get { throw new NotImplementedException (); }
-               }
-#endif
-
                [StringValidator (MinLength = 1)]
                [ConfigurationProperty ("name", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
                public string Name {