Example #1
0
        public void Dispose()
        {
            isStart = false;
            //TODO 对子对象进行动态Dispose



            _taskEventComponent.Dispose();
            _taskEventComponent = null;

            _createComponent.Dispose();
            _createComponent = null;

            _handlerComponent.Dispose();
            _handlerComponent = null;

            _envirinfoComponent.Dispose();
            _envirinfoComponent = null;

            _commandComponent.Dispose();
            _commandComponent = null;


            _eventComponent.Dispose();
            _eventComponent = null;

            _configComponent.Dispose();
            _configComponent = null;
        }
Example #2
0
 protected void CreateComponent()
 {
     _configComponent         = new ConfigComponentBase(this);
     _eventComponent          = new EventComponentBase();
     _commandComponent        = new CommandComponentBase();
     _envirinfoComponent      = new EnvirinfoComponentBase();
     _handlerComponent        = new HandlerComponentBase(this);
     _createComponent         = new CreateComponentBase(this);
     _taskEventComponent      = new TaskEventComponentBase(this);
     contactListenerComponent = new ContactListenerComponentBase(_envirinfoComponent);
 }