internal Type GetProviderTypeForExtension(string extension) { #if NET_4_0 return(global::System.Web.Compilation.BuildProvider.GetProviderTypeForExtension(extension)); #else if (String.IsNullOrEmpty(extension)) { return(null); } BuildProvider provider = this [extension]; if (provider == null) { return(null); } Type type = HttpApplication.LoadType(provider.Type); if (type == null) { return(null); } return(type); #endif }
public void EqualsAndHashCode () { BuildProvider b1, b2; b1 = new BuildProvider (".hi", "System.Bye"); b2 = new BuildProvider (".hi", "System.Bye"); Assert.IsTrue (b1.Equals (b2), "A1"); Assert.AreEqual (b1.GetHashCode (), b2.GetHashCode (), "A2"); }
public override bool Equals(object provider) { BuildProvider p = provider as BuildProvider; if (p == null) { return(false); } return(Extension == p.Extension && Type == p.Type); }
internal static BuildProviderInfo GetBuildProviderInfo(CompilationSection config, string extension) { System.Web.Configuration.BuildProvider provider = config.BuildProviders[extension]; if (provider != null) { return(provider.BuildProviderInfo); } BuildProviderInfo info = null; s_dynamicallyRegisteredProviders.TryGetValue(extension, out info); return(info); }
public void Type_validationFailure () { BuildProvider b = new BuildProvider ("hi", "bye"); b.Type = ""; }
public void Extension_validationFailure () { BuildProvider b = new BuildProvider ("hi", "bye"); b.Extension = ""; }
public void ctor_validationFailure2 () { BuildProvider b = new BuildProvider ("hi", ""); }
public void Add (BuildProvider buildProvider) { BaseAdd (buildProvider); }
public void Add(BuildProvider buildProvider) { BaseAdd(buildProvider); }
protected override object GetElementKey(ConfigurationElement element) { BuildProvider prov = (BuildProvider)element; return(prov.Extension); }
public void Add(BuildProvider buildProvider) { }
// this override is required because AppliesTo may be in any order in the // property string but it still and the default equals operator would consider // them different depending on order in the persisted string. public override bool Equals(object provider) { BuildProvider o = provider as BuildProvider; return(o != null && StringUtil.EqualsIgnoreCase(Extension, o.Extension) && Type == o.Type); }
public ConfigurationBuildProviderInfo(BuildProvider buildProvider) { Debug.Assert(buildProvider != null); _buildProvider = buildProvider; }
private void ClearBuildProvider() { this.buildProvider = null; }
public BuildProviderInfo(System.Web.Configuration.BuildProvider buildProvider) { this.buildProvider = buildProvider; }