예제 #1
0
    static ReflectedClrType AllocateClass(Type clrType)
    {
        string name = TypeManager.GetPythonTypeName(clrType);

        var type = TypeManager.AllocateTypeObject(name, Runtime.PyCLRMetaType);

        type.Flags = TypeFlags.Default
                     | TypeFlags.HasClrInstance
                     | TypeFlags.HeapType
                     | TypeFlags.BaseType
                     | TypeFlags.HaveGC;

        return(new ReflectedClrType(type.Steal()));
    }