예제 #1
0
        public Type GetType(bool throwOnError = true, bool ignoreCase = true)
        {
            if (Segments.Length == 0)
            {
                if (throwOnError)
                    throw new FormatException("The TypeUrn is not in a valid format");

                return null;
            }

            string typeName = new TypeUrnParser()
                .Parse(this);

            return Type.GetType(typeName, throwOnError, ignoreCase);
        }
예제 #2
0
        public Type GetType(bool throwOnError = true, bool ignoreCase = true)
        {
            if (Segments.Length == 0)
            {
                if (throwOnError)
                {
                    throw new FormatException("The TypeUrn is not in a valid format");
                }

                return(null);
            }

            string typeName = new TypeUrnParser()
                              .Parse(this);

            return(Type.GetType(typeName, throwOnError, ignoreCase));
        }