public MainWindow() { _httpClient = new HttpClient(new HttpLoggingHandler()).UseMonstercatApiV2(); _api = MonstercatApi.Create(_httpClient); var configuration = new ConfigurationBuilder() .AddUserSecrets <MainWindow>() .Build(); var sectionName = typeof(ApiCredentials).Name; var section = configuration.GetSection(sectionName); section.Bind(Credentials); InitializeComponent(); _timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(250) }; _timer.Tick += timer1_Tick; }
public void Test_CtorArgsForNull() { Assert.Throws <ArgumentNullException>(() => MonstercatApi.Create(null)); }
private static IMonstercatApi Create() { return(MonstercatApi.Create(new HttpClient(new HttpLoggingHandler()).UseMonstercatApiV2())); }