2 instantiations of WeatherForecastContext
Microsoft.Extensions.Options.Contextual.Tests (2)
AcceptanceTests.cs (2)
96
Assert.Equal("Fahrenheit", (await forecastService.GetForecast(new
WeatherForecastContext
{ Country = "US" }, CancellationToken.None)).First().TemperatureScale);
97
Assert.Equal("Celsius", (await forecastService.GetForecast(new
WeatherForecastContext
{ Country = "CA" }, CancellationToken.None)).First().TemperatureScale);
8 references to WeatherForecastContext
Microsoft.Extensions.Options.Contextual.Tests (8)
AcceptanceTests.cs (4)
47
private readonly IContextualOptions<WeatherForecastOptions,
WeatherForecastContext
> _contextualOptions;
50
public WeatherForecastService(IContextualOptions<WeatherForecastOptions,
WeatherForecastContext
> contextualOptions)
55
public async Task<IEnumerable<WeatherForecast>> GetForecast(
WeatherForecastContext
context, CancellationToken cancellationToken)
69
Task<IEnumerable<WeatherForecast>> GetForecast(
WeatherForecastContext
context, CancellationToken cancellationToken);
ContextualOptionsServiceCollectionExtensionsTests.cs (4)
24
Assert.IsType<ContextualOptions<object,
WeatherForecastContext
>>(provider.GetRequiredService<IContextualOptions<object,
WeatherForecastContext
>>());
25
Assert.IsType<ContextualOptions<object,
WeatherForecastContext
>>(provider.GetRequiredService<INamedContextualOptions<object,
WeatherForecastContext
>>());