AspNetEdit.Editor.ComponentModel.WebFormReferenceManager.GetTagPrefix C# (CSharp) Метод

GetTagPrefix() публичный Метод

public GetTagPrefix ( Type objectType ) : string
objectType System.Type
Результат string
        public string GetTagPrefix(Type objectType)
        {
            if (objectType.Namespace.StartsWith ("System.Web.UI"))
                return "asp";

            DocumentDirective[] directives = host.RootDocument.GetDirectives ("Reference");
            foreach (DocumentDirective dd in directives)
                if (0 == string.Compare (dd["Namespace"], objectType.Namespace, true, CultureInfo.InvariantCulture))
                    return dd["Tagprefix"];

            throw new Exception ("A tag prefix has not been registered for " + objectType.ToString ());
        }