2 implementations of Resources
Aspire.Hosting (1)
DistributedApplicationBuilder.cs (1)
76public IResourceCollection Resources { get; } = new ResourceCollection();
Aspire.Hosting.Tests (1)
Utils\TestDistributedApplicationBuilder.cs (1)
132public IResourceCollection Resources => _innerBuilder.Resources;
44 references to Resources
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
199var eventHubsEmulatorResources = builder.ApplicationBuilder.Resources.OfType<AzureEventHubsResource>().Where(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
42var storage = builder.Resources
Aspire.Hosting.Azure.PostgreSQL (3)
AzurePostgresExtensions.cs (3)
213var azureDatabases = builder.ApplicationBuilder.Resources 252appBuilder.Resources.Remove(azureResource); 255appBuilder.Resources.Remove(database.Value);
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
158builder.ApplicationBuilder.Resources.Remove(azureResource);
Aspire.Hosting.Azure.Sql (3)
AzureSqlExtensions.cs (3)
157var azureDatabases = builder.ApplicationBuilder.Resources 186appBuilder.Resources.Remove(azureResource); 189appBuilder.Resources.Remove(database.Value);
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
96if (builder.ApplicationBuilder.Resources.OfType<KafkaUIContainerResource>().SingleOrDefault() is { } existingKafkaUIResource) 115var kafkaResources = builder.ApplicationBuilder.Resources.OfType<KafkaServerResource>();
Aspire.Hosting.MongoDB.Tests (2)
AddMongoDBTests.cs (2)
118var resource = Assert.Single(builder.Resources.OfType<MongoExpressContainerResource>()); 134var resource = Assert.Single(builder.Resources.OfType<MongoExpressContainerResource>());
Aspire.Hosting.MySql (2)
MySqlBuilderExtensions.cs (2)
98if (builder.ApplicationBuilder.Resources.OfType<PhpMyAdminContainerResource>().Any()) 117var mySqlInstances = builder.ApplicationBuilder.Resources.OfType<MySqlServerResource>();
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
245var myAdmin = builder.Resources.Single(r => r.Name.EndsWith("-phpmyadmin")); 278var myAdmin = builder.Resources.Single(r => r.Name.EndsWith("-phpmyadmin"));
Aspire.Hosting.PostgreSQL (5)
PostgresBuilderExtensions.cs (5)
138if (builder.ApplicationBuilder.Resources.OfType<PgAdminContainerResource>().SingleOrDefault() is { } existingPgAdminResource) 161var postgresInstances = builder.ApplicationBuilder.Resources.OfType<PostgresServerResource>(); 272if (builder.ApplicationBuilder.Resources.OfType<PgWebContainerResource>().SingleOrDefault() is { } existingPgWebResource) 298var adminResource = builder.ApplicationBuilder.Resources.OfType<PgWebContainerResource>().Single(); 300var postgresInstances = builder.ApplicationBuilder.Resources.OfType<PostgresDatabaseResource>();
Aspire.Hosting.PostgreSQL.Tests (5)
AddPostgresTests.cs (5)
394Assert.Single(builder.Resources.OfType<PgWebContainerResource>()); 408var resource = Assert.Single(builder.Resources.OfType<PgWebContainerResource>()); 424var resource = Assert.Single(builder.Resources.OfType<PgWebContainerResource>()); 463var pgadmin = builder.Resources.Single(r => r.Name.EndsWith("-pgadmin")); 510var pgadmin = builder.Resources.Single(r => r.Name.EndsWith("-pgweb"));
Aspire.Hosting.Redis (5)
RedisBuilderExtensions.cs (5)
81if (builder.ApplicationBuilder.Resources.OfType<RedisCommanderResource>().SingleOrDefault() is { } existingRedisCommanderResource) 100var redisInstances = builder.ApplicationBuilder.Resources.OfType<RedisResource>(); 148if (builder.ApplicationBuilder.Resources.OfType<RedisInsightResource>().SingleOrDefault() is { } existingRedisCommanderResource) 176var redisInstances = builder.ApplicationBuilder.Resources.OfType<RedisResource>(); 187var redisInsightResource = builder.ApplicationBuilder.Resources.OfType<RedisInsightResource>().Single();
Aspire.Hosting.Redis.Tests (8)
AddRedisTests.cs (8)
129Assert.Single(builder.Resources.OfType<RedisCommanderResource>()); 139Assert.Single(builder.Resources.OfType<RedisInsightResource>()); 153var resource = Assert.Single(builder.Resources.OfType<RedisCommanderResource>()); 171var resource = Assert.Single(builder.Resources.OfType<RedisInsightResource>()); 187var resource = Assert.Single(builder.Resources.OfType<RedisCommanderResource>()); 201var resource = Assert.Single(builder.Resources.OfType<RedisInsightResource>()); 218var commander = builder.Resources.Single(r => r.Name.EndsWith("-commander")); 242var commander = builder.Resources.Single(r => r.Name.EndsWith("-commander"));
Aspire.Hosting.Tests (4)
DistributedApplicationBuilderTests.cs (4)
148appBuilder.Resources.Add(new ContainerResource("Test")); 149appBuilder.Resources.Add(new ContainerResource("Test")); 160appBuilder.Resources.Add(new ContainerResource("Test")); 161appBuilder.Resources.Add(new ContainerResource("TEST"));