1 write to Spec
Aspire.Hosting (1)
Dcp\Model\ModelCommon.cs (1)
130
Spec
= spec;
54 references to Spec
Aspire.Hosting (54)
Dcp\ApplicationExecutor.cs (47)
614
var environment = GetEnvironmentVariables(container.Status?.EffectiveEnv ?? container.
Spec
.Env, container.
Spec
.Env);
631
new(KnownProperties.Container.Image, container.
Spec
.Image),
633
new(KnownProperties.Container.Command, container.
Spec
.Command),
649
if (container.
Spec
.Ports is null)
655
foreach (var port in container.
Spec
.Ports)
667
return (container.
Spec
.Persistent ?? false) ? ContainerLifetime.Persistent : ContainerLifetime.Session;
686
var environment = GetEnvironmentVariables(executable.Status?.EffectiveEnv, executable.
Spec
.Env);
702
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
703
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
723
new(KnownProperties.Executable.Path, executable.
Spec
.ExecutablePath),
724
new(KnownProperties.Executable.WorkDir, executable.
Spec
.WorkingDirectory),
816
return container.
Spec
.VolumeMounts?.Select(v => new VolumeSnapshot(v.Source, v.Target ?? "", v.Type, v.IsReadOnly)).ToImmutableArray() ?? [];
1044
svc.
Spec
.Port = port;
1045
svc.
Spec
.Protocol = PortProtocol.FromProtocolType(endpoint.Protocol);
1046
svc.
Spec
.Address = endpoint.TargetHost switch
1051
svc.
Spec
.AddressAllocationMode = endpoint.IsProxied ? AddressAllocationModes.Localhost : AddressAllocationModes.Proxyless;
1081
exe.
Spec
.WorkingDirectory = executable.WorkingDirectory;
1082
exe.
Spec
.ExecutionType = ExecutionType.Process;
1113
exeSpec.
Spec
.WorkingDirectory = Path.GetDirectoryName(projectMetadata.ProjectPath);
1128
exeSpec.
Spec
.ExecutionType = ExecutionType.IDE;
1138
exeSpec.
Spec
.ExecutionType = ExecutionType.Process;
1141
exeSpec.
Spec
.Args = [
1150
exeSpec.
Spec
.Args = [
1161
exeSpec.
Spec
.Args.AddRange(new[] { "-c", _distributedApplicationOptions.Configuration });
1170
exeSpec.
Spec
.Args.Add("--no-launch-profile");
1178
exeSpec.
Spec
.Args.Add("--");
1179
exeSpec.
Spec
.Args.AddRange(cmdArgs);
1314
spec = exe.
Spec
;
1318
spec = ers.
Spec
.Template.Spec;
1469
ctr.
Spec
.ContainerName = containerObjectInstance.Name; // Use the same name for container orchestrator (Docker, Podman) resource and DCP object name.
1473
ctr.
Spec
.Persistent = true;
1483
ctr.
Spec
.VolumeMounts = [];
1495
ctr.
Spec
.VolumeMounts.Add(volumeSpec);
1499
ctr.
Spec
.Networks = new List<ContainerNetworkConnection>
1614
dcpContainerResource.
Spec
.Env = [];
1618
dcpContainerResource.
Spec
.Ports = new();
1642
dcpContainerResource.
Spec
.Ports.Add(portSpec);
1671
dcpContainerResource.
Spec
.Env.Add(new EnvVar { Name = kvp.Key, Value = value });
1685
dcpContainerResource.
Spec
.RunArgs ??= [];
1708
dcpContainerResource.
Spec
.RunArgs.Add(value);
1716
dcpContainerResource.
Spec
.Args ??= [];
1741
dcpContainerResource.
Spec
.Args.Add(value);
1755
dcpContainerResource.
Spec
.Command = containerResource.Entrypoint;
1796
dcpContainerResource.
Spec
.Build = new()
1837
dcpContainerResource.
Spec
.Build = new()
1906
if (resource is ExecutableReplicaSet ers && ers.
Spec
.Replicas > 1)
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;