1 write to Spec
Aspire.Hosting (1)
Dcp\Model\ModelCommon.cs (1)
142
Spec
= spec;
40 references to Spec
Aspire.Hosting (40)
Dcp\DcpExecutor.cs (20)
630
.Where(sr => !sr.Service.HasCompleteAddress && sr.Service.
Spec
.AddressAllocationMode != AddressAllocationModes.Proxyless)
775
svc.
Spec
.Port = port;
776
svc.
Spec
.Protocol = PortProtocol.FromProtocolType(endpoint.Protocol);
777
svc.
Spec
.Address = endpoint.TargetHost switch
782
svc.
Spec
.AddressAllocationMode = endpoint.IsProxied ? AddressAllocationModes.Localhost : AddressAllocationModes.Proxyless;
812
exe.
Spec
.WorkingDirectory = executable.WorkingDirectory;
813
exe.
Spec
.ExecutionType = ExecutionType.Process;
844
exeSpec.
Spec
.WorkingDirectory = Path.GetDirectoryName(projectMetadata.ProjectPath);
861
exeSpec.
Spec
.ExecutionType = ExecutionType.IDE;
871
exeSpec.
Spec
.ExecutionType = ExecutionType.Process;
1017
var spec = exe.
Spec
;
1122
ctr.
Spec
.ContainerName = containerObjectInstance.Name; // Use the same name for container orchestrator (Docker, Podman) resource and DCP object name.
1126
ctr.
Spec
.Persistent = true;
1131
ctr.
Spec
.PullPolicy = pullPolicy switch
1145
ctr.
Spec
.Networks = new List<ContainerNetworkConnection>
1250
var spec = dcpContainerResource.
Spec
;
1313
dcpContainerResource.
Spec
.Build = new()
1354
dcpContainerResource.
Spec
.Build = new()
1486
patch = CreatePatch(c, obj => obj.
Spec
.Stop = true);
1501
patch = CreatePatch(e, obj => obj.
Spec
.Stop = true);
Dcp\Model\ExecutableReplicaSet.cs (1)
109
ers.
Spec
.Template.Spec.ExecutablePath = executablePath;
Dcp\Model\Service.cs (6)
87
public int? AllocatedPort =>
Spec
.Port ?? Status?.EffectivePort;
88
public string? AllocatedAddress =>
Spec
.Address ?? Status?.EffectiveAddress;
95
Spec
.Port = other.
Spec
.Port;
96
Spec
.Address = other.
Spec
.Address;
Dcp\ResourceSnapshotBuilder.cs (13)
26
var environment = GetEnvironmentVariables(container.Status?.EffectiveEnv ?? container.
Spec
.Env, container.
Spec
.Env);
49
new(KnownProperties.Container.Image, container.
Spec
.Image),
51
new(KnownProperties.Container.Command, container.
Spec
.Command),
69
if (container.
Spec
.Ports is null)
75
foreach (var port in container.
Spec
.Ports)
87
return (container.
Spec
.Persistent ?? false) ? ContainerLifetime.Persistent : ContainerLifetime.Session;
106
var environment = GetEnvironmentVariables(executable.Status?.EffectiveEnv, executable.
Spec
.Env);
124
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
125
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
147
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
148
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
234
return container.
Spec
.VolumeMounts?.Select(v => new VolumeSnapshot(v.Source, v.Target ?? "", v.Type, v.IsReadOnly)).ToImmutableArray() ?? [];