Exemplo n.º 1
0
        void error(Exception e)
        {
            if (_watcher_ == null)
            {
                return;
            }

            end();
            _exception_ = e;

            ActivationChanged.raise();
        }
Exemplo n.º 2
0
        void watchdog()
        {
            // check if the watcher is running
            if (_exception_ == null)
            {
                return;
            }

            Debug.Assert(_watcher_ == null);
            tryBegin();

            ActivationChanged.raise();
        }
Exemplo n.º 3
0
        public void deactivate()
        {
            if (_generated_ == null)
            {
                return;
            }

            Deactivating.raise();

            deactivating();

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

            ActivationChanged.raise();
        }
Exemplo n.º 4
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();
        }