44 references to EntrypointType
Aspire.Hosting.Python (33)
PythonAppResourceBuilderExtensions.cs (32)
68
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
103
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Module, moduleName, DefaultVirtualEnvFolder)
141
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Executable, executableName, DefaultVirtualEnvFolder);
178
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
221
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, virtualEnvironmentPath)
269
EntrypointType
.Executable,
351
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
359
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
478
var
entrypointType = entrypointAnnotation.Type;
545
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
637
case
EntrypointType
.Script:
640
case
EntrypointType
.Module:
643
case
EntrypointType
.Executable:
650
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
737
case
EntrypointType
.Script:
740
case
EntrypointType
.Module:
743
case
EntrypointType
.Executable:
899
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
900
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
950
var
entrypointType = entrypointAnnotation.Type;
956
if (entrypointType ==
EntrypointType
.Script)
1010
if (annotation.Type ==
EntrypointType
.Module)
1021
else if (annotation.Type ==
EntrypointType
.Script)
1065
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1082
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1083
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1106
var
entrypointType = existingAnnotation.Type;
1112
case
EntrypointType
.Module:
1116
case
EntrypointType
.Script:
1119
case
EntrypointType
.Executable:
PythonEntrypointAnnotation.cs (1)
16
public required
EntrypointType
Type { get; set; }
Aspire.Hosting.Python.Tests (11)
AddPythonAppTests.cs (11)
219
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
896
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
915
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
934
Assert.Equal(
EntrypointType
.Executable, entrypointAnnotation.Type);
1119
pythonBuilder.WithEntrypoint(
EntrypointType
.Module, "uvicorn")
1129
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
1155
pythonBuilder.WithEntrypoint(
EntrypointType
.Executable, "pytest");
1174
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1185
builder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1199
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, null!));
1203
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, string.Empty));