Esempio n. 1
0
        public void RemoveOutputSource(string outputSourceKey)
        {
            if (!OutputSource.ContainsKey(outputSourceKey))
            {
                throw new ArgumentException($"{outputSourceKey} does not exist.");
            }

            _outputSource.Remove(outputSourceKey);

            _eventAggregator.GetEvent <OutputSourceRemovedEvent>().Publish(new OutputSourceRemovedEvent()
            {
                OutputSourceName = outputSourceKey
            });
        }
Esempio n. 2
0
        public void AddOutputSource(string outputSourceKey)
        {
            if (OutputSource.ContainsKey(outputSourceKey))
            {
                throw new ArgumentException($"{outputSourceKey} alread exist.");
            }

            _outputSource[outputSourceKey] = string.Empty;

            _eventAggregator.GetEvent <OutputSourceAddedEvent>().Publish(new OutputSourceAddedEvent()
            {
                OutputSourceName = outputSourceKey
            });
        }