internal static string GetDisplayName(System.Web.Compilation.BuildProvider buildProvider)
 {
     if (buildProvider.VirtualPath != null)
     {
         return(buildProvider.VirtualPath);
     }
     return(buildProvider.GetType().Name);
 }
        internal virtual void AddBuildProvider(System.Web.Compilation.BuildProvider buildProvider)
        {
            object key  = buildProvider;
            bool   flag = false;

            if (this._compConfig.FolderLevelBuildProviders != null)
            {
                Type t = buildProvider.GetType();
                flag = this._compConfig.FolderLevelBuildProviders.IsFolderLevelBuildProvider(t);
            }
            if ((buildProvider.VirtualPath != null) && !flag)
            {
                key = buildProvider.VirtualPath;
                if (this._buildProviders.ContainsKey(key))
                {
                    return;
                }
            }
            this._buildProviders[key] = buildProvider;
            try
            {
                buildProvider.GenerateCode(this);
            }
            catch (XmlException exception)
            {
                throw new HttpParseException(exception.Message, null, buildProvider.VirtualPath, null, exception.LineNumber);
            }
            catch (XmlSchemaException exception2)
            {
                throw new HttpParseException(exception2.Message, null, buildProvider.VirtualPath, null, exception2.LineNumber);
            }
            catch (Exception exception3)
            {
                throw new HttpParseException(exception3.Message, exception3, buildProvider.VirtualPath, null, 1);
            }
            InternalBuildProvider owningBuildProvider = buildProvider as InternalBuildProvider;

            if (owningBuildProvider != null)
            {
                ICollection compileWithDependencies = owningBuildProvider.GetCompileWithDependencies();
                if (compileWithDependencies != null)
                {
                    foreach (VirtualPath path in compileWithDependencies)
                    {
                        if (!this._buildProviders.ContainsKey(path.VirtualPathString))
                        {
                            this.AddCompileWithBuildProvider(path, owningBuildProvider);
                        }
                    }
                }
            }
        }