Beispiel #1
0
        public Servers(params Action[] onInites)
        {
            mServerMapper = new KeyValueList <string, IServer>();

            mNewServers       = new List <IServer>();
            mServersWillSort  = new List <IServer>();
            mServersWillCheck = new List <IServer>();
            mInitPriorType    = typeof(ServerPriority);

            mAliasID              = new IntegerID <string>();
            mTypeMapper           = new IntegerMapper <Type>();
            mBinderIDs            = new IntegerID <ResolvableBinder>();
            mResolvableNameMapper = new IntegerMapper <string>();

            mBinderMapper      = new Dictionary <int, ResolvableBinder>();
            mResolvablesMapper = new Dictionary <int, IResolvable>();
            mResolvableConfigs = new KeyValueList <int, IResolvableConfig>();

            int max = onInites.Length;

            for (int i = 0; i < max; i++)
            {
                OnInit += onInites[i];
            }
        }
Beispiel #2
0
 public virtual void Init()
 {
     mEntitasIDs        = new List <int>();
     mEntitasIDsRemoved = new List <int>();
     mEntitasIDsRelease = new List <int>();
     mEntitas           = new IntegerMapper <IShipDockEntitas>();
 }
 public virtual void Init(IShipDockComponentContext context)
 {
     mEntitasIDs        = new List <int>();
     mEntitasIDsRemoved = new List <int>();
     mEntitasIDsRelease = new List <int>();
     mEntitas           = new IntegerMapper <IShipDockEntitas>();
 }
Beispiel #4
0
        public static ResolvableBinder CreateResolvableRef(ref ResolvableInfo info, ref IntegerMapper <Type> typeIDMapper)
        {
            ResolvableBinder result = new ResolvableBinder(ref typeIDMapper)
            {
                alias         = info.aliasID,
                interfaceType = info.interfaceID,
                insType       = info.typeID
            };

            return(result);
        }
Beispiel #5
0
        public void InitResolver <InterfaceT>(IServersHolder serverHolder, IPoolBase pool = default)
        {
            InstanceFactory         = pool;
            ResolveType             = Binder.GetInstanceType(serverHolder);
            mConstructor            = ResolveType.GetConstructor;
            mDefaultConstructorInfo = mConstructor(defaultGenericType);

            if (mResolverIDMapper == default)
            {
                mResolverIDMapper = new IntegerMapper <string>();
            }
            SetResolver <InterfaceT>(RESOLVER_CRT, OnResolverDefault, out _);
        }
        public ShipDockComponentManager()
        {
            mComponent = default;
            mIDMapper  = new KeyValueList <int, int>();
            mMapper    = new IntegerMapper <IShipDockComponent>();

            mDeletdComponents = new List <int>();
            mUpdateByTicks    = new List <IShipDockComponent>();
            mUpdateByScene    = new List <IShipDockComponent>();

            mQueueUpdateTime    = new DoubleBuffers <int>();
            mQueueUpdateEntitas = new DoubleBuffers <IShipDockEntitas>();
            mQueueUpdateExecute = new DoubleBuffers <Action <int, IShipDockEntitas> >();

            mQueueUpdateExecute.OnDequeue += OnQueueUpdateExecute;
        }
Beispiel #7
0
 public void Dispose()
 {
     alias         = -1;
     interfaceType = -1;
     mTypeID       = default;
 }
Beispiel #8
0
 public ResolvableBinder(ref IntegerMapper <Type> types)
 {
     mTypeID = types;
 }