コード例 #1
0
        public CodenationApi()
        {
            _client = new RestClient("https://api.codenation.dev/v1/challenge/dev-ps");

            // Adiciona o suporte ao serializer Newtonsoft.
            _client.UseNewtonsoftJson();

            var services = ServiceProviderBuilder
                           .GetServiceProvider();

            _codenationSecrets = services
                                 .GetRequiredService <IOptions <CodenationSecrets> >()
                                 .Value;
        }
コード例 #2
0
 public WeatherForecastTests()
 {
     this.services = ServiceProviderBuilder.GetServiceProvider(new string[] { "" });
     this.options  = services.GetRequiredService <IOptions <SecretsModel> >();
 }