public void deactivate() { if (_generated_ == null) { return; } Deactivating.raise(); deactivating(); _generated_.Dispose(); _generated_ = null; _param = default(ParamT); ActivationChanged.raise(); }
public void activate(ParamT param) { if (IsActive) { deactivate(); } if (_disablingRequests != 0) { return; } _param = param; _generated_ = _generator(param); activated(param); Activated.raise(param); ActivationChanged.raise(); }