9 types derived from ContainerResource
Aspire.Hosting.Elasticsearch (1)
ElasticsearchResource.cs (1)
9
public class ElasticsearchResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
11
public class MilvusServerResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
9
public class MySqlServerResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
9
public class OracleDatabaseServerResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
12
public class PostgresServerResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.Qdrant (1)
QdrantServerResource.cs (1)
9
public class QdrantServerResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.RabbitMQ (1)
RabbitMQServerResource.cs (1)
9
public class RabbitMQServerResource :
ContainerResource
, IResourceWithConnectionString, IResourceWithEnvironment
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
9
public class SqlServerServerResource :
ContainerResource
, IResourceWithConnectionString
Aspire.Hosting.Tests (1)
ExpressionResolverTests.cs (1)
121
sealed class TestExpressionResolverResource :
ContainerResource
, IResourceWithEndpoints, IResourceWithConnectionString
11 instantiations of ContainerResource
Aspire.Hosting.Tests (11)
DistributedApplicationBuilderTests.cs (8)
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")));
148
appBuilder.Resources.Add(new
ContainerResource
("Test"));
149
appBuilder.Resources.Add(new
ContainerResource
("Test"));
160
appBuilder.Resources.Add(new
ContainerResource
("Test"));
161
appBuilder.Resources.Add(new
ContainerResource
("TEST"));
ExpressionResolverTests.cs (3)
58
var source = builder.AddResource(new
ContainerResource
("testSource"))
86
var test = builder.AddResource(new
ContainerResource
("testSource"))
108
var test = builder.AddResource(new
ContainerResource
("testSource"))
44 references to ContainerResource
Aspire.Hosting (36)
ApplicationModel\ContainerLifetimeAnnotation.cs (3)
22
/// current <see cref="
ContainerResource
"/> configuration.
26
/// <item>If the container WAS originally created by Aspire, and the <see cref="
ContainerResource
"/> configuration DOES match the existing container, the existing container will be re-used.</item>
27
/// <item>If the container WAS originally created by Aspire, and the <see cref="
ContainerResource
"/> configuration DOES NOT match the existing container, the existing container will be stopped and a new container created in order to apply the updated configuration.</item>
ContainerResourceBuilderExtensions.cs (25)
21
public static IResourceBuilder<
ContainerResource
> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image)
38
public static IResourceBuilder<
ContainerResource
> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image, string tag)
45
var
container = new ContainerResource(name);
59
public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string? name, string target, bool isReadOnly = false) where T :
ContainerResource
75
public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string target) where T :
ContainerResource
93
public static IResourceBuilder<T> WithBindMount<T>(this IResourceBuilder<T> builder, string source, string target, bool isReadOnly = false) where T :
ContainerResource
110
public static IResourceBuilder<T> WithEntrypoint<T>(this IResourceBuilder<T> builder, string entrypoint) where T :
ContainerResource
126
public static IResourceBuilder<T> WithImageTag<T>(this IResourceBuilder<T> builder, string tag) where T :
ContainerResource
147
public static IResourceBuilder<T> WithImageRegistry<T>(this IResourceBuilder<T> builder, string? registry) where T :
ContainerResource
168
public static IResourceBuilder<T> WithImage<T>(this IResourceBuilder<T> builder, string image, string tag = "latest") where T :
ContainerResource
194
public static IResourceBuilder<T> WithImageSHA256<T>(this IResourceBuilder<T> builder, string sha256) where T :
ContainerResource
218
public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, params string[] args) where T :
ContainerResource
235
public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Action<ContainerRuntimeArgsCallbackContext> callback) where T :
ContainerResource
257
public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Func<ContainerRuntimeArgsCallbackContext, Task> callback) where T :
ContainerResource
284
public static IResourceBuilder<T> WithLifetime<T>(this IResourceBuilder<T> builder, ContainerLifetime lifetime) where T :
ContainerResource
291
private static IResourceBuilder<T> ThrowResourceIsNotContainer<T>(IResourceBuilder<T> builder) where T :
ContainerResource
301
public static IResourceBuilder<T> PublishAsContainer<T>(this IResourceBuilder<T> builder) where T :
ContainerResource
311
/// <typeparam name="T">Type parameter specifying any type derived from <see cref="
ContainerResource
"/>/</typeparam>
319
/// When this method is called an annotation is added to the <see cref="
ContainerResource
"/> that specifies the context path and
345
public static IResourceBuilder<T> WithDockerfile<T>(this IResourceBuilder<T> builder, string contextPath, string? dockerfilePath = null, string? stage = null) where T :
ContainerResource
405
public static IResourceBuilder<
ContainerResource
> AddDockerfile(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, string? dockerfilePath = null, string? stage = null)
428
public static IResourceBuilder<T> WithContainerName<T>(this IResourceBuilder<T> builder, string name) where T :
ContainerResource
467
public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, object value) where T :
ContainerResource
518
public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T :
ContainerResource
565
public static IResourceBuilder<T> WithBuildSecret<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T :
ContainerResource
Dashboard\DashboardLifecycleHook.cs (1)
145
ContainerResource
=> KnownResourceTypes.Container,
Dcp\ApplicationExecutor.cs (1)
1736
if (modelContainerResource is
ContainerResource
containerResource)
ParameterResourceBuilderExtensions.cs (1)
240
where T :
ContainerResource
, IResourceWithConnectionString
Publishing\ManifestPublishingContext.cs (5)
99
else if (resource is
ContainerResource
container)
249
public async Task WriteContainerAsync(
ContainerResource
container)
299
private void WriteBuildContext(
ContainerResource
container)
419
(
ContainerResource
, _, null, int port) => port,
584
private void WriteContainerMounts(
ContainerResource
container)
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppContainerExtensions.cs (1)
34
public static IResourceBuilder<T> PublishAsAzureContainerApp<T>(this IResourceBuilder<T> container, Action<AzureResourceInfrastructure, ContainerApp> configure) where T :
ContainerResource
AzureContainerAppsInfrastructure.cs (1)
294
(
ContainerResource
, _, null, int port) => port,
Aspire.Hosting.Dapr.Tests (4)
DaprTests.cs (4)
41
var
container = Assert.Single(model.Resources.OfType<
ContainerResource
>());
140
var
container = Assert.Single(model.Resources.OfType<
ContainerResource
>());
Aspire.Hosting.MySql.Tests (1)
AddMySqlTests.cs (1)
230
Assert.Single(builder.Resources.OfType<
ContainerResource
>().Where(resource => resource.Name is "mySql-phpmyadmin"));
Aspire.Hosting.Tests (1)
Dcp\ApplicationExecutorTests.cs (1)
809
(Action<IResourceBuilder<
ContainerResource
>> AddEndpoint, string ErrorMessageFragment)[] testcases = [