22 references to WorkloadMountKind
Aspire.Hosting.Native.Core (11)
Runtime\RuntimeStates.cs (6)
57public static WorkloadMountKind ParseMountKind(string value) => value switch 59"bind" => WorkloadMountKind.Bind, 60"volume" => WorkloadMountKind.Volume, 71public static string ToWire(this WorkloadMountKind kind) => kind switch 73WorkloadMountKind.Bind => "bind", 74WorkloadMountKind.Volume => "volume",
Runtime\WorkloadDefinition.cs (5)
17internal sealed record WorkloadMount(WorkloadMountKind Type, string Source, string Target, bool ReadOnly); 109mount.Type is not (WorkloadMountKind.Bind or WorkloadMountKind.Volume) || 110mount.Type == WorkloadMountKind.Bind && (!Path.IsPathFullyQualified(mount.Source) || 112mount.Type == WorkloadMountKind.Volume && (mount.Source.Length is < 1 or > 255 ||
Aspire.Hosting.Native.Core.Tests (5)
DcpJsonTests.cs (2)
22VolumeMounts = [new DcpVolumeMount(WorkloadMountKind.Volume, "retained-data", "/data", false), 23new DcpVolumeMount(WorkloadMountKind.Bind, "/host/config", "/config", true)]
NativeBuilderAuthoringTests.cs (1)
141Aspire.Hosting.Native.Runtime.WorkloadMountKind.Volume, volume, "/data", false)),
NativeProtocolParsingTests.cs (1)
99Assert.Equal(WorkloadMountKind.Volume, RuntimeStates.ParseMountKind("volume"));
WorkloadDefinitionTests.cs (1)
25Assert.Equal([new WorkloadMount(WorkloadMountKind.Volume, "retained-data", "/data", false)], plan.Mounts);
Aspire.Hosting.Native.Server (6)
Api\DeclarativeWorkloadApi.cs (2)
179.Append(new WorkloadMount(WorkloadMountKind.Volume, name, target, readOnly)).ToImmutableArray(); 198.Append(new WorkloadMount(WorkloadMountKind.Bind, source, target, readOnly)).ToImmutableArray();
Dcp\DcpDataTypes.cs (1)
36[property: JsonConverter(typeof(WorkloadMountKindConverter))] WorkloadMountKind Type, string Source, string Target, bool ReadOnly);
Dcp\DcpStates.cs (3)
101internal sealed class WorkloadMountKindConverter : JsonConverter<WorkloadMountKind> 103public override WorkloadMountKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => 105public override void Write(Utf8JsonWriter writer, WorkloadMountKind value, JsonSerializerOptions options) =>