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; }
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); }