30 references to Dependency
Microsoft.AspNetCore.OpenApi.Tests (30)
Transformers\TypeBasedTransformerLifetimeTests.cs (30)
34
var serviceCollection = new ServiceCollection().AddSingleton<
Dependency
>();
45
Dependency
.InstantiationCount = 0;
54
Assert.Equal(1,
Dependency
.InstantiationCount);
60
var serviceCollection = new ServiceCollection().AddScoped<
Dependency
>();
71
Dependency
.InstantiationCount = 0;
80
Assert.Equal(3,
Dependency
.InstantiationCount);
86
var serviceCollection = new ServiceCollection().AddTransient<
Dependency
>();
97
Dependency
.InstantiationCount = 0;
106
Assert.Equal(3,
Dependency
.InstantiationCount);
133
var serviceCollection = new ServiceCollection().AddSingleton<
Dependency
>();
143
Dependency
.InstantiationCount = 0;
152
Assert.Equal(1,
Dependency
.InstantiationCount);
158
var serviceCollection = new ServiceCollection().AddScoped<
Dependency
>();
169
Dependency
.InstantiationCount = 0;
178
Assert.Equal(3,
Dependency
.InstantiationCount);
184
var serviceCollection = new ServiceCollection().AddTransient<
Dependency
>();
195
Dependency
.InstantiationCount = 0;
204
Assert.Equal(3,
Dependency
.InstantiationCount);
253
var serviceCollection = new ServiceCollection().AddSingleton<
Dependency
>();
264
Dependency
.InstantiationCount = 0;
273
Assert.Equal(1,
Dependency
.InstantiationCount);
279
var serviceCollection = new ServiceCollection().AddScoped<
Dependency
>();
290
Dependency
.InstantiationCount = 0;
299
Assert.Equal(3,
Dependency
.InstantiationCount);
305
var serviceCollection = new ServiceCollection().AddTransient<
Dependency
>();
316
Dependency
.InstantiationCount = 0;
325
Assert.Equal(3,
Dependency
.InstantiationCount);
359
public ActivatedSchemaTransformerWithDependency(
Dependency
dependency)
388
public ActivatedOperationTransformerWithDependency(
Dependency
dependency)
417
public ActivatedDocumentTransformerWithDependency(
Dependency
dependency)