public InaraPlugin(IPlayerStateHistoryRecorder playerStateRecorder, ISettingsProvider settingsProvider, IRestClientFactory restClientFactory, IUserNotificationInterface notificationInterface) : base(settingsProvider) { RestClient = restClientFactory.CreateRestClient(InaraApiUrl); this.playerStateRecorder = playerStateRecorder; this.notificationInterface = notificationInterface; EventConverter = new InaraEventConverter(this.playerStateRecorder); settingsProvider.SettingsChanged += (o, e) => ReloadSettings(); ReloadSettings(); }
public EdsmPlugin(ISettingsProvider settingsProvider, IPlayerStateHistoryRecorder playerStateRecorder, IRestClientFactory restClientFactory, IUserNotificationInterface notificationInterface) : base(settingsProvider) { RestClient = restClientFactory.CreateRestClient(EdsmApiUrl); EventConverter = new EdsmEventConverter(playerStateRecorder); ignoredEvents = RestClient.GetAsync("discard") .ContinueWith((t) => t.IsFaulted ? new HashSet <string>() : new HashSet <string>(JArray.Parse(t.Result).ToObject <string[]>())); settingsProvider.SettingsChanged += (o, e) => ReloadSettings(); ReloadSettings(); this.notificationInterface = notificationInterface; }