Пример #1
0
        public static QualifiedName GetQualifiedName(this Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            var tt = type.GetTypeInfo();

            if (tt.IsGenericParameter || (tt.IsGenericType && !tt.IsGenericTypeDefinition))
            {
                throw RuntimeFailure.QualifiedNameCannotBeGeneratedFromConstructed("type");
            }

            AssemblyInfo ai    = AssemblyInfo.GetAssemblyInfo(tt.Assembly);
            NamespaceUri xmlns = ai.GetXmlNamespace(tt.Namespace);

            return(xmlns + QualName(type));
        }