示例#1
0
        public EnginesRoot(ITicker ticker)
        {
            ticker.Add(this);

            _nodeEngines             = new Dictionary <Type, FasterList <INodeEngine <INode> > >();
            _engineRootWeakReference = new WeakReference <EnginesRoot>(this);
            _otherEnginesReferences  = new FasterList <IEngine>();

            _nodesDB    = new Dictionary <Type, FasterList <INode> >();
            _nodesDBdic = new Dictionary <Type, Dictionary <int, INode> >();

            _nodesToAdd    = new Queue <INode>();
            _nodesToRemove = new Queue <INode>();
        }
示例#2
0
        public virtual void Start(bool dispatch = false)
        {
            if (!IsBusy)
            {
                if (dispatch)
                {
                    ticker = DispatcherTicker.Default;
                }
                else
                {
                    ticker = Ticker.Default;
                }

                startTime = DateTime.Now + BeginTime;
                ticker.Add(this);

                IsBusy = true;
            }
        }