Exemple #1
0
 public void Dispose()
 {
     if (m_nativeInstance != IntPtr.Zero)
     {
         TypeCollectionNative.Destroy(m_nativeInstance);
         m_nativeInstance = IntPtr.Zero;
     }
 }
Exemple #2
0
        public bool Load(string path)
        {
            if (!TypeCollectionNative.Load(m_nativeInstance, path))
            {
                return(false);
            }

            return(true);
        }
Exemple #3
0
        public TypeCollection()
        {
            m_types      = new List <Type>();
            m_interfaces = new List <InterfaceType>();
            m_structs    = new List <StructType>();
            m_arrays     = new List <ArrayType>();

            m_nativeInstance = TypeCollectionNative.Create();
        }
Exemple #4
0
        public ArrayType MakeArray(Type baseType)
        {
            IntPtr typeHandle = TypeCollectionNative.MakeArray(m_nativeInstance, baseType.NativeInstance);

            return(GetTypeFromHandle(typeHandle) as ArrayType);
        }
Exemple #5
0
        public StructType FindStructByCrc(UInt16 typeCrc)
        {
            IntPtr typeHandle = TypeCollectionNative.FindStructByCrc(m_nativeInstance, typeCrc);

            return(GetTypeFromHandle(typeHandle) as StructType);
        }
Exemple #6
0
        public StructType FindStruct(string name, string referenceNamespace)
        {
            IntPtr typeHandle = TypeCollectionNative.FindStruct(m_nativeInstance, name, referenceNamespace);

            return(GetTypeFromHandle(typeHandle) as StructType);
        }
Exemple #7
0
        public InterfaceType FindInterfaceByCrc(UInt16 typeCrc)
        {
            IntPtr typeHandle = TypeCollectionNative.FindInterfaceByCrc(m_nativeInstance, typeCrc);

            return(GetTypeFromHandle(typeHandle) as InterfaceType);
        }