private StateService()
        {
            _chromeConnection.Start();
            _chromeConnection.OnSlackStateChanged += (o, state) => UpdateState(state);

            _processorsChain = new StateProcessorsChain();
            _processorsChain.AddProcessor(new SnoozingProcessor());
            _processorsChain.AddProcessor(new StateAnimationProcessor());
            _processorsChain.AddProcessor(new StateCallbackProcessor(slackState => OnStateChange(null, slackState)));
        }
        private StateService()
        {
            _chromeConnection.Start();
            _chromeConnection.OnSlackStateChanged += (o, state) => UpdateState(state);

            _processorsChain = new StateProcessorsChain();
            _processorsChain.AddProcessor(new SnoozingProcessor());
            _processorsChain.AddProcessor(new StateAnimationProcessor());
            _processorsChain.AddProcessor(new StateCallbackProcessor(slackState => OnStateChange(null, slackState)));
        }
        public void Start()
        {
            _snoozingProcessor = new SnoozingProcessor(() => OnSnoozeFinished(this, null));

            _processorsChain = new StateProcessorsChain();
            _processorsChain.AddProcessor(new StateCallbackProcessor(slackState => OnStateChange(null, slackState)));
            _processorsChain.AddProcessor(new StateAnimationProcessor());
            _processorsChain.AddProcessor(_snoozingProcessor);

            ConnectionToExtension();
        }
Exemple #4
0
        private StateService()
        {
            _snoozingProcessor = new SnoozingProcessor(() => OnSnoozeFinished(this, null));

            _processorsChain = new StateProcessorsChain();
            _processorsChain.AddProcessor(new StateCallbackProcessor(slackState => OnStateChange(null, slackState)));
            _processorsChain.AddProcessor(new StateAnimationProcessor());
            _processorsChain.AddProcessor(_snoozingProcessor);

            _processorsChain.HandleState(new SlackState(TrayStates.DisconnectedFromExtension));

            ConnectionToExtension();
        }