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)
625
.Where(sr => !sr.Service.HasCompleteAddress && sr.Service.
Spec
.AddressAllocationMode != AddressAllocationModes.Proxyless)
770
svc.
Spec
.Port = port;
771
svc.
Spec
.Protocol = PortProtocol.FromProtocolType(endpoint.Protocol);
772
svc.
Spec
.Address = endpoint.TargetHost switch
777
svc.
Spec
.AddressAllocationMode = endpoint.IsProxied ? AddressAllocationModes.Localhost : AddressAllocationModes.Proxyless;
807
exe.
Spec
.WorkingDirectory = executable.WorkingDirectory;
808
exe.
Spec
.ExecutionType = ExecutionType.Process;
839
exeSpec.
Spec
.WorkingDirectory = Path.GetDirectoryName(projectMetadata.ProjectPath);
856
exeSpec.
Spec
.ExecutionType = ExecutionType.IDE;
866
exeSpec.
Spec
.ExecutionType = ExecutionType.Process;
1012
var spec = exe.
Spec
;
1117
ctr.
Spec
.ContainerName = containerObjectInstance.Name; // Use the same name for container orchestrator (Docker, Podman) resource and DCP object name.
1121
ctr.
Spec
.Persistent = true;
1126
ctr.
Spec
.PullPolicy = pullPolicy switch
1140
ctr.
Spec
.Networks = new List<ContainerNetworkConnection>
1245
var spec = dcpContainerResource.
Spec
;
1308
dcpContainerResource.
Spec
.Build = new()
1349
dcpContainerResource.
Spec
.Build = new()
1481
patch = CreatePatch(c, obj => obj.
Spec
.Stop = true);
1496
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);
47
new(KnownProperties.Container.Image, container.
Spec
.Image),
49
new(KnownProperties.Container.Command, container.
Spec
.Command),
67
if (container.
Spec
.Ports is null)
73
foreach (var port in container.
Spec
.Ports)
85
return (container.
Spec
.Persistent ?? false) ? ContainerLifetime.Persistent : ContainerLifetime.Session;
104
var environment = GetEnvironmentVariables(executable.Status?.EffectiveEnv, executable.
Spec
.Env);
122
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
123
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
145
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
146
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
232
return container.
Spec
.VolumeMounts?.Select(v => new VolumeSnapshot(v.Source, v.Target ?? "", v.Type, v.IsReadOnly)).ToImmutableArray() ?? [];