示例#1
0
        private IType FindType(string fullname)
        {
            var type = _assembly.FindType(fullname);

            if (type == null)
            {
                throw new InvalidOperationException(string.Format("Unable to find {0}. Invalid corlib.", fullname));
            }
            return(type);
        }
示例#2
0
        /// <summary>
        /// Finds type in given assembly.
        /// </summary>
        /// <param name="asm"></param>
        /// <param name="fullname"></param>
        /// <returns></returns>
        public static IType FindType(IAssembly asm, string fullname)
        {
            var t = asm.FindType(fullname);

            if (t == null)
            {
                throw new InvalidOperationException(
                          String.Format("Unable to find type {0}.", fullname));
            }
            return(t);
        }
示例#3
0
        private IType Resolve(SystemTypeCode typeCode)
        {
            var fullName = GetFullName(typeCode);

            return(_assembly.FindType(fullName));
        }