[asp.net] Use faster string comparison in caches in System.Web.Compilation
[mono.git] / mcs / class / System.Web / System.Web.Compilation / AppCodeCompiler.cs
index 2e6b3155b87a5d516689afcfd794af4cacdb69e6..3a288b642704fe4d0058be7acd5f7d119e0241de 100644 (file)
@@ -27,7 +27,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
+
 using System;
 using System.CodeDom;
 using System.CodeDom.Compiler;
@@ -281,7 +281,7 @@ namespace System.Web.Compilation
                        if (file == null || file.Length == 0 || buildProviders == null || buildProviders.Count == 0)
                                return null;
 
-                       BuildProvider ret = buildProviders.GetProviderForExtension (Path.GetExtension (file));
+                       BuildProvider ret = buildProviders.GetProviderInstanceForExtension (Path.GetExtension (file));
                        if (ret != null && IsCorrectBuilderType (ret)) {
                                ret.SetVirtualPath (PhysicalToVirtual (file));
                                return ret;
@@ -614,7 +614,11 @@ namespace System.Web.Compilation
                {
                        if (ps == null || !ps.Enabled)
                                return false;
-                       if (!String.IsNullOrEmpty (ps.Inherits) || (ps.PropertySettings != null && ps.PropertySettings.Count > 0))
+
+                       RootProfilePropertySettingsCollection props = ps.PropertySettings;
+                       ProfileGroupSettingsCollection groups = props != null ? props.GroupSettings : null;
+                       
+                       if (!String.IsNullOrEmpty (ps.Inherits) || (props != null && props.Count > 0) || (groups != null && groups.Count > 0))
                                return true;
 
                        return false;
@@ -742,4 +746,4 @@ namespace System.Web.Compilation
                }
        }
 }
-#endif
+