20 references to ContainerLifetime
Aspire.Hosting (14)
ApplicationModel\ResourceExtensions.cs (5)
280/// Defaults to <see cref="ContainerLifetime.Session"/> if no <see cref="ContainerLifetimeAnnotation"/> is found. 284/// The <see cref="ContainerLifetime"/> from the <see cref="ContainerLifetimeAnnotation"/> for the resource (if the annotation exists). 285/// Defaults to <see cref="ContainerLifetime.Session"/> if the annotation is not set. 287internal static ContainerLifetime GetContainerLifetimeType(this IResource resource) 294return ContainerLifetime.Session;
ContainerResourceBuilderExtensions.cs (4)
271/// <param name="lifetime">The lifetime behavior of the container resource. The defaults behavior is <see cref="ContainerLifetime.Session"/>.</param> 274/// Marking a container resource to have a <see cref="ContainerLifetime.Persistent"/> lifetime. 281public static IResourceBuilder<T> WithLifetime<T>(this IResourceBuilder<T> builder, ContainerLifetime lifetime) where T : ContainerResource 414/// Combining this with <see cref="ContainerLifetime.Persistent"/> will allow Aspire to re-use an existing container that was not
Dcp\ApplicationExecutor.cs (4)
655ContainerLifetime GetContainerLifetime() 657return (container.Spec.Persistent ?? false) ? ContainerLifetime.Persistent : ContainerLifetime.Session; 1452if (container.GetContainerLifetimeType() == ContainerLifetime.Persistent)
Dcp\DcpNameGenerator.cs (1)
67ContainerLifetime.Session => GetRandomNameSuffix(),
Aspire.Hosting.Azure.Tests (1)
AzureResourceOptionsTests.cs (1)
38.RunAsContainer(x => x.WithLifetime(ContainerLifetime.Persistent))
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
145c.WithLifetime(ContainerLifetime.Persistent); 185c.WithLifetime(ContainerLifetime.Persistent);
AzureContainerApps.AppHost (3)
Program.cs (3)
16.WithLifetime(ContainerLifetime.Persistent) 21.RunAsEmulator(c => c.WithLifetime(ContainerLifetime.Persistent)) 26.RunAsEmulator(c => c.WithLifetime(ContainerLifetime.Persistent))