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 }); }
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 }); }