2 implementations of AddResource
Aspire.Hosting (1)
DistributedApplicationBuilder.cs (1)
422
public IResourceBuilder<T>
AddResource
<T>(T resource) where T : IResource
Aspire.Hosting.Tests (1)
Utils\TestDistributedApplicationBuilder.cs (1)
136
public IResourceBuilder<T>
AddResource
<T>(T resource) where T : IResource => _innerBuilder.AddResource(resource);
25 references to AddResource
Aspire.Hosting (4)
IDistributedApplicationBuilder.cs (3)
134
/// The <see cref="
AddResource
{T}(T)"/> method is not typically used directly by developers building
141
/// method which makes use of the <see cref="
AddResource
{T}(T)"/> method to add a container resource to the application. In .NET Aspire
143
/// constructs a resource derived from <see cref="IResource"/> and adds it to the application model using the <see cref="
AddResource
{T}(T)"/>
ParameterResourceBuilderExtensions.cs (1)
192
return builder.
AddResource
(resource)
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
93
var azureSqlServer = builder.
AddResource
(resource)
Aspire.Hosting.Dapr (1)
IDistributedApplicationBuilderExtensions.cs (1)
47
.
AddResource
(resource)
Aspire.Hosting.Elasticsearch (1)
ElasticsearchBuilderExtensions.cs (1)
82
return builder.
AddResource
(elasticsearch)
Aspire.Hosting.Milvus (1)
MilvusBuilderExtensions.cs (1)
53
return builder.
AddResource
(milvus)
Aspire.Hosting.MongoDB (1)
MongoDBBuilderExtensions.cs (1)
123
.
AddResource
(mongoDBDatabase);
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
53
return builder.
AddResource
(resource)
Aspire.Hosting.Oracle (1)
OracleDatabaseBuilderExtensions.cs (1)
50
return builder.
AddResource
(oracleDatabaseServer)
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
77
return builder.
AddResource
(postgresServer)
Aspire.Hosting.Qdrant (1)
QdrantBuilderExtensions.cs (1)
68
return builder.
AddResource
(qdrant)
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
63
var rabbitmq = builder.
AddResource
(rabbitMq)
Aspire.Hosting.SqlServer (2)
SqlServerBuilderExtensions.cs (2)
51
return builder.
AddResource
(sqlServer)
80
return builder.ApplicationBuilder.
AddResource
(sqlServerDatabase);
Aspire.Hosting.Tests (9)
DistributedApplicationBuilderTests.cs (5)
56
appBuilder.
AddResource
(new TestResource());
126
appBuilder.
AddResource
(new ContainerResource("Test"));
128
var ex = Assert.Throws<DistributedApplicationException>(() => appBuilder.
AddResource
(new ContainerResource("Test")));
137
appBuilder.
AddResource
(new ContainerResource("Test"));
139
var ex = Assert.Throws<DistributedApplicationException>(() => appBuilder.
AddResource
(new ContainerResource("TEST")));
ExpressionResolverTests.cs (4)
35
var target = builder.
AddResource
(new TestExpressionResolverResource(exprName))
58
var source = builder.
AddResource
(new ContainerResource("testSource"))
86
var test = builder.
AddResource
(new ContainerResource("testSource"))
108
var test = builder.
AddResource
(new ContainerResource("testSource"))