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

public GetType ( string name ) : Type
name string
Результат Type
Пример #1
0
		internal static void Load(Assembly assembly)
		{
			genericEnumEnumType = assembly.GetType(DotNetTypeWrapper.GenericEnumEnumTypeName);
			genericDelegateInterfaceType = assembly.GetType(DotNetTypeWrapper.GenericDelegateInterfaceTypeName);
			genericAttributeAnnotationType = assembly.GetType(DotNetTypeWrapper.GenericAttributeAnnotationTypeName);
			genericAttributeAnnotationMultipleType = assembly.GetType(DotNetTypeWrapper.GenericAttributeAnnotationMultipleTypeName);
			genericAttributeAnnotationReturnValueType = assembly.GetType(DotNetTypeWrapper.GenericAttributeAnnotationReturnValueTypeName);
		}
Пример #2
0
        public static void Init(string baseCorlibDir)
        {
            if (baseCorlibDir == null)
                baseCorlibDir = typeof(int).Assembly.Location;
            mscorlib = universe.LoadFile(baseCorlibDir);
            if (mscorlib == null)
            {
                Report.Error($"Could not load mscorlib from {baseCorlibDir}");
            }
            AttributeType = mscorlib.GetType("System.Attribute");
            VoidType = mscorlib.GetType("System.Void");
            IntPtrType = mscorlib.GetType("System.IntPtr");
            UIntPtrType = mscorlib.GetType("System.UIntPtr");
            StringType = mscorlib.GetType("System.String");
            ObjectType = mscorlib.GetType("System.Object");
            TypeType = mscorlib.GetType("System.Type");

            MethodInfoType = mscorlib.GetType("System.Reflection.MethodInfo");
            FieldInfoType = mscorlib.GetType("System.Reflection.FieldInfo");
            PropertyInfoType = mscorlib.GetType("System.Reflection.PropertyInfo");
            AssemblyType = mscorlib.GetType("System.Reflection.Assembly");
            ModuleType = mscorlib.GetType("System.Reflection.Module");
        }