public static TSettings GetSettings <TSettings>(this ISettingsService settingsService) { if (settingsService == null) { throw new ArgumentNullException(nameof(settingsService)); } var uri = SettingsUriGenerator.From(typeof(TSettings)); return(settingsService.GetSettings <TSettings>(uri)); }
public static void CreateSettingsMonitor <TSettings>(this ISettingsService settingsService, Action <SettingsChangedEventArgs <TSettings> > callback) { if (settingsService == null) { throw new ArgumentNullException(nameof(settingsService)); } var uri = SettingsUriGenerator.From(typeof(TSettings)); settingsService.CreateSettingsMonitor(uri, callback); }