1 write to Spec
Aspire.Hosting (1)
Dcp\Model\ModelCommon.cs (1)
142Spec = spec;
41 references to Spec
Aspire.Hosting (41)
Dcp\DcpExecutor.cs (21)
587.Where(sr => !sr.Service.HasCompleteAddress && sr.Service.Spec.AddressAllocationMode != AddressAllocationModes.Proxyless) 732svc.Spec.Port = port; 733svc.Spec.Protocol = PortProtocol.FromProtocolType(endpoint.Protocol); 734svc.Spec.Address = endpoint.TargetHost switch 739svc.Spec.AddressAllocationMode = endpoint.IsProxied ? AddressAllocationModes.Localhost : AddressAllocationModes.Proxyless; 769exe.Spec.WorkingDirectory = executable.WorkingDirectory; 770exe.Spec.ExecutionType = ExecutionType.Process; 801exeSpec.Spec.WorkingDirectory = Path.GetDirectoryName(projectMetadata.ProjectPath); 818exeSpec.Spec.ExecutionType = ExecutionType.IDE; 828exeSpec.Spec.ExecutionType = ExecutionType.Process; 981spec = exe.Spec; 1029ctr.Spec.ContainerName = containerObjectInstance.Name; // Use the same name for container orchestrator (Docker, Podman) resource and DCP object name. 1033ctr.Spec.Persistent = true; 1043ctr.Spec.VolumeMounts = []; 1055ctr.Spec.VolumeMounts.Add(volumeSpec); 1059ctr.Spec.Networks = new List<ContainerNetworkConnection> 1160var spec = dcpContainerResource.Spec; 1219dcpContainerResource.Spec.Build = new() 1260dcpContainerResource.Spec.Build = new() 1388patch = CreatePatch(c, obj => obj.Spec.Stop = true); 1392patch = CreatePatch(e, obj => obj.Spec.Stop = true);
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;
Dcp\ResourceSnapshotBuilder.cs (13)
26var environment = GetEnvironmentVariables(container.Status?.EffectiveEnv ?? container.Spec.Env, container.Spec.Env); 47new(KnownProperties.Container.Image, container.Spec.Image), 49new(KnownProperties.Container.Command, container.Spec.Command), 67if (container.Spec.Ports is null) 73foreach (var port in container.Spec.Ports) 85return (container.Spec.Persistent ?? false) ? ContainerLifetime.Persistent : ContainerLifetime.Session; 104var environment = GetEnvironmentVariables(executable.Status?.EffectiveEnv, executable.Spec.Env); 122new(KnownProperties.Executable.Path, executable.Spec.ExecutablePath), 123new(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory), 145new(KnownProperties.Executable.Path, executable.Spec.ExecutablePath), 146new(KnownProperties.Executable.WorkDir, executable.Spec.WorkingDirectory), 265return container.Spec.VolumeMounts?.Select(v => new VolumeSnapshot(v.Source, v.Target ?? "", v.Type, v.IsReadOnly)).ToImmutableArray() ?? [];