TARGET_J2EE: enable embedding web.config into a jar
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / BuildProviderCollection.cs
index cd2c2e6a08d91ca9cf13c0e3b29f462f0b295f04..5132c3731105477a0bbb5aa13387848fea1f4341 100644 (file)
@@ -92,6 +92,19 @@ namespace System.Web.Configuration
                        BuildProvider prov = (BuildProvider) element;
                        return prov.Extension;
                }
+
+               internal System.Web.Compilation.BuildProvider GetProviderForExtension (string extension)
+               {
+                       foreach (BuildProvider provider in this) {
+                               if (extension != provider.Extension)
+                                       continue;
+
+                               Type type = Type.GetType (provider.Type);
+                               return (System.Web.Compilation.BuildProvider) Activator.CreateInstance (type, null);
+                       }
+
+                       return null;
+               }
        }
 }
 #endif // NET_2_0