예제 #1
0
        public bool GetTypeHandle(TypeId_I id, out RuntimeTypeHandle typeHandle)
        {
            var context = GetGlobalContext();

            lock (context.SyncRoot)
            {
                return(context.TypeHandles.TryGetValue(id.Value, out typeHandle));
            }
        }
예제 #2
0
        public object GetApi(TypeId_I typeId)
        {
            var contextHost = XContextual.GetGlobal <LogicalGlobalContextHost_I>();

            if (typeId.Value == 0)
            {
                return(null);
            }

            if (contextHost.Logical.LogicApis.TryGetValue(typeId.Value, out object logicObject))
            {
                return(logicObject);
            }

            return(null);
        }
예제 #3
0
        public bool EnsureTypeId(RuntimeTypeHandle typeHandle, out TypeId_I id)
        {
            var context = GetGlobalContext();

            lock (context.SyncRoot)
            {
                if (!context.TypeIdsByTypeHandle.TryGetValue(typeHandle, out id))
                {
                    id = AddTypeId(typeHandle);

                    return(false);
                }

                return(true);
            }
        }
예제 #4
0
 /// <summary>
 /// Gets a logic container api based upon a typeid
 /// </summary>
 /// <param name="typeId"></param>
 /// <returns></returns>
 public LogicContainerApi_I GetApi(TypeId_I typeId)
 {
     // get from DI
     throw new System.NotImplementedException();
 }
예제 #5
0
 public bool GetTypeId(RuntimeTypeHandle typeHandle, out TypeId_I id)
 {
     return(XTypeIdentification.GetTypeId(typeHandle, out id));
 }
예제 #6
0
        public RuntimeTypeHandle GetTypeHandle(TypeId_I zTypeId)
        {
            XTypeIdentification.GetTypeHandle(zTypeId, out RuntimeTypeHandle typeHandle);

            return(typeHandle);
        }
예제 #7
0
 public bool GetTypeHandle(TypeId_I id, out RuntimeTypeHandle typeHandle)
 {
     return(XTypeIdentification.GetTypeHandle(id, out typeHandle));
 }
예제 #8
0
 public static bool GetTypeHandle(TypeId_I id, out RuntimeTypeHandle typeHandle)
 {
     return(Api.GetTypeHandle(id, out typeHandle));
 }
예제 #9
0
 public static bool GetTypeId(RuntimeTypeHandle typeHandle, out TypeId_I id)
 {
     return(Api.EnsureTypeId(typeHandle, out id));
 }
예제 #10
0
 public static RuntimeTypeHandle GetTypeHandle(TypeId_I zTypeId)
 {
     return(Api.GetTypeHandle(zTypeId));
 }
예제 #11
0
파일: XLogicBase.cs 프로젝트: E01D/Base
 public static object GetApi(TypeId_I typeId)
 {
     return(Api.GetApi(typeId));
 }