Ejemplo n.º 1
0
        unsafe public static bool IsSubtype(SharedHeap.Allocation *childData,
                                            SystemType parent)
        {
            UIntPtr childHandle = SharedHeap.Allocation.GetType(childData);

            return(IsSubtype(childHandle, parent.id));
        }
Ejemplo n.º 2
0
        /// Called from Binder which lives in a separate dll.
        public static SystemType Register(string name,
                                          long lowerHash,
                                          long upperHash,
                                          SystemType parent)
        {
            RuntimeSystemType parentrts = HandleTable.GetHandle(parent.id) as RuntimeSystemType;

#if false
            DebugStub.WriteLine("SystemType.Register '{0}' hash0={1:x8} hash1={2:x8} Parent {3}",
                                __arglist(name, lowerHash, upperHash, parent.TypeId));

            Tracing.Log(Tracing.Debug, "Type '{0}' (parent={1:x8})",
                        name, parent.id);
            Tracing.Log(Tracing.Debug, "hash0={0:x8} hash1={1:x8}",
                        lowerHash.ToString(), upperHash.ToString());
#endif // false

            UIntPtr childHandle = parentrts.LookupChildHandle(name, lowerHash, upperHash);

#if false
            Tracing.Log(Tracing.Debug, "result UIntPtr = {0:x8}", childHandle);
#endif // false

            SystemType ret = new SystemType(childHandle);
            return(ret);
        }
Ejemplo n.º 3
0
        unsafe public static SystemType Register(char *name,
                                                 int nameLength,
                                                 long lowerHash,
                                                 long upperHash,
                                                 SystemType parent)
        {
            string sname = new String(name, 0, nameLength);

            return(Register(sname, lowerHash, upperHash, parent));
        }
Ejemplo n.º 4
0
 public static bool IsSubtype(SystemType child,
                              SystemType parent)
 {
     return(IsSubtype(child.id, parent.id));
 }
Ejemplo n.º 5
0
 public static bool IsNull(SystemType st)
 {
     return(st.id == UIntPtr.Zero);
 }
Ejemplo n.º 6
0
 unsafe public static extern bool IsSubtype(SharedHeapService.Allocation *childData,
                                            SystemType parent);
Ejemplo n.º 7
0
 public static extern bool IsSubtype(SystemType child,
                                     SystemType parent);
Ejemplo n.º 8
0
 unsafe public static extern SystemType Register(char *name,
                                                 int nameLength,
                                                 long lowerHash,
                                                 long upperHash,
                                                 SystemType parent);