1 write to Spec
Aspire.Hosting (1)
Dcp\Model\ModelCommon.cs (1)
142
Spec
= spec;
47 references to Spec
Aspire.Hosting (47)
Dcp\DcpExecutor.cs (25)
429
if (container.
Spec
.Start == false && (container.Status?.State == null || container.Status?.State == ContainerState.Pending))
640
.Where(sr => !sr.Service.HasCompleteAddress && sr.Service.
Spec
.AddressAllocationMode != AddressAllocationModes.Proxyless)
792
svc.
Spec
.Port = port;
793
svc.
Spec
.Protocol = PortProtocol.FromProtocolType(endpoint.Protocol);
794
svc.
Spec
.Address = endpoint.TargetHost switch
799
svc.
Spec
.AddressAllocationMode = endpoint.IsProxied ? AddressAllocationModes.Localhost : AddressAllocationModes.Proxyless;
829
exe.
Spec
.WorkingDirectory = executable.WorkingDirectory;
830
exe.
Spec
.ExecutionType = ExecutionType.Process;
861
exeSpec.
Spec
.WorkingDirectory = Path.GetDirectoryName(projectMetadata.ProjectPath);
878
exeSpec.
Spec
.ExecutionType = ExecutionType.IDE;
888
exeSpec.
Spec
.ExecutionType = ExecutionType.Process;
1034
var spec = exe.
Spec
;
1139
ctr.
Spec
.ContainerName = containerObjectInstance.Name; // Use the same name for container orchestrator (Docker, Podman) resource and DCP object name.
1143
ctr.
Spec
.Persistent = true;
1148
ctr.
Spec
.PullPolicy = pullPolicy switch
1162
ctr.
Spec
.Networks = new List<ContainerNetworkConnection>
1235
network.
Spec
.Persistent = true;
1238
network.
Spec
.NetworkName = $"{DefaultAspireNetworkName}-{_nameGenerator.GetProjectHashSuffix()}";
1254
container.
Spec
.Start = false;
1278
var spec = dcpContainerResource.
Spec
;
1341
dcpContainerResource.
Spec
.Build = new()
1382
dcpContainerResource.
Spec
.Build = new()
1514
patch = CreatePatch(c, obj => obj.
Spec
.Stop = true);
1529
patch = CreatePatch(e, obj => obj.
Spec
.Stop = true);
1585
c.
Spec
.Start = 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 (15)
26
var environment = GetEnvironmentVariables(container.Status?.EffectiveEnv ?? container.
Spec
.Env, container.
Spec
.Env);
29
if (container.
Spec
.Start is false && (state == null || state == ContainerState.Pending))
52
new(KnownProperties.Container.Image, container.
Spec
.Image),
54
new(KnownProperties.Container.Command, container.
Spec
.Command),
72
if (container.
Spec
.Ports is null)
78
foreach (var port in container.
Spec
.Ports)
90
return (container.
Spec
.Persistent ?? false) ? ContainerLifetime.Persistent : ContainerLifetime.Session;
109
var environment = GetEnvironmentVariables(executable.Status?.EffectiveEnv, executable.
Spec
.Env);
127
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
128
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
150
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
151
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
215
var activeEndpoint = _resourceState.EndpointsMap.SingleOrDefault(e => e.Value.
Spec
.ServiceName == serviceName && e.Value.Metadata.OwnerReferences?.Any(or => or.Kind == resource.Kind && or.Name == name) == true).Value;
237
return container.
Spec
.VolumeMounts?.Select(v => new VolumeSnapshot(v.Source, v.Target ?? "", v.Type, v.IsReadOnly)).ToImmutableArray() ?? [];