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