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