41 references to ContainerMountType
Aspire.Hosting (10)
ApplicationModel\ContainerMountAnnotation.cs (4)
22public ContainerMountAnnotation(string? source, string target, ContainerMountType type, bool isReadOnly) 24if (type == ContainerMountType.BindMount) 37if (type == ContainerMountType.Volume && string.IsNullOrEmpty(source) && isReadOnly) 61public ContainerMountType Type { get; }
ContainerResourceBuilderExtensions.cs (3)
64var annotation = new ContainerMountAnnotation(name, target, ContainerMountType.Volume, isReadOnly); 80var annotation = new ContainerMountAnnotation(null, target, ContainerMountType.Volume, false); 99var annotation = new ContainerMountAnnotation(Path.GetFullPath(source, builder.ApplicationBuilder.AppHostDirectory), target, ContainerMountType.BindMount, isReadOnly);
Dcp\ApplicationExecutor.cs (1)
1491Type = mount.Type == ContainerMountType.BindMount ? VolumeMountType.Bind : VolumeMountType.Volume,
Publishing\ManifestPublishingContext.cs (2)
589var bindMounts = mounts.Where(mounts => mounts.Type == ContainerMountType.BindMount).ToList(); 615var volumes = mounts.Where(mounts => mounts.Type == ContainerMountType.Volume).ToList();
Aspire.Hosting.Azure.AppContainers (8)
AzureContainerAppsInfrastructure.cs (8)
555ContainerMountType.BindMount => ($"{bindMountIndex}", $"bm{bindMountIndex}"), 556ContainerMountType.Volume => ($"{volumeIndex}", $"v{volumeIndex}"), 560if (volume.Type == ContainerMountType.BindMount) 712private ProvisioningParameter AllocateVolumeStorageAccount(ContainerMountType type, string volumeIndex) => 980private sealed class VolumeStorageExpression(IResource resource, ContainerMountType type, string index) : IManifestExpressionProvider 984ContainerMountType.BindMount => $"{{{resource.Name}.bindMounts.{index}.storage}}", 985ContainerMountType.Volume => $"{{{resource.Name}.volumes.{index}.storage}}", 989public static IManifestExpressionProvider GetVolumeStorage(IResource resource, ContainerMountType type, string index) =>
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
141ContainerMountType.BindMount,
Aspire.Hosting.Azure.Tests (8)
AzureEventHubsExtensionsTests.cs (4)
112Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type); 129Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type); 146Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type); 163Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type);
AzureResourceExtensionsTests.cs (4)
36Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type); 62Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type); 88Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type); 114Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type);
Aspire.Hosting.Containers.Tests (3)
ContainerMountAnnotationTests.cs (3)
17Assert.Throws<ArgumentNullException>("source", () => new ContainerMountAnnotation(source, "/usr/foo", ContainerMountType.BindMount, false)); 24Assert.Throws<ArgumentException>("source", () => new ContainerMountAnnotation("usr/foo", "/usr/foo", ContainerMountType.BindMount, false)); 30Assert.Throws<ArgumentException>("isReadOnly", () => new ContainerMountAnnotation(null, "/usr/foo", ContainerMountType.Volume, true));
Aspire.Hosting.Garnet.Tests (2)
AddGarnetTests.cs (2)
134Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type); 159Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type);
Aspire.Hosting.Keycloak.Tests (3)
KeycloakResourceBuilderTests.cs (3)
57Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type); 72Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type); 103Assert.Equal(ContainerMountType.BindMount, containerAnnotation.Type);
Aspire.Hosting.Redis.Tests (2)
AddRedisTests.cs (2)
273Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type); 298Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type);
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
134Assert.Equal(ContainerMountType.Volume, volumeAnnotation.Type); 159Assert.Equal(ContainerMountType.BindMount, volumeAnnotation.Type);
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationExtensions.cs (2)
54.Where(m => m.Type == ContainerMountType.Volume && !string.IsNullOrEmpty(m.Source)) 74var newMount = new ContainerMountAnnotation(newName, volume.Target, ContainerMountType.Volume, volume.IsReadOnly);