44 references to EntrypointType
Aspire.Hosting.Python (33)
PythonAppResourceBuilderExtensions.cs (32)
67
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
102
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Module, moduleName, DefaultVirtualEnvFolder)
140
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Executable, executableName, DefaultVirtualEnvFolder);
177
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
220
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, virtualEnvironmentPath)
268
EntrypointType
.Executable,
350
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
358
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
475
var
entrypointType = entrypointAnnotation.Type;
542
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
634
case
EntrypointType
.Script:
637
case
EntrypointType
.Module:
640
case
EntrypointType
.Executable:
647
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
734
case
EntrypointType
.Script:
737
case
EntrypointType
.Module:
740
case
EntrypointType
.Executable:
896
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
897
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
947
var
entrypointType = entrypointAnnotation.Type;
953
if (entrypointType ==
EntrypointType
.Script)
1007
if (annotation.Type ==
EntrypointType
.Module)
1018
else if (annotation.Type ==
EntrypointType
.Script)
1062
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1079
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1080
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1103
var
entrypointType = existingAnnotation.Type;
1109
case
EntrypointType
.Module:
1113
case
EntrypointType
.Script:
1116
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);
919
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
938
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
957
Assert.Equal(
EntrypointType
.Executable, entrypointAnnotation.Type);
1142
pythonBuilder.WithEntrypoint(
EntrypointType
.Module, "uvicorn")
1152
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
1178
pythonBuilder.WithEntrypoint(
EntrypointType
.Executable, "pytest");
1197
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1208
builder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1222
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, null!));
1226
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, string.Empty));