Exemple #1
0
        public void deactivate()
        {
            if (_generated_ == null)
            {
                return;
            }

            Deactivating.raise();

            deactivating();

            _generated_.Dispose();
            _generated_ = null;
            _param      = default(ParamT);

            ActivationChanged.raise();
        }
Exemple #2
0
        public void activate(ParamT param)
        {
            if (IsActive)
            {
                deactivate();
            }

            if (_disablingRequests != 0)
            {
                return;
            }

            _param      = param;
            _generated_ = _generator(param);

            activated(param);

            Activated.raise(param);
            ActivationChanged.raise();
        }