44 references to EntrypointType
Aspire.Hosting.Python (33)
PythonAppResourceBuilderExtensions.cs (32)
68
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
104
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Module, moduleName, DefaultVirtualEnvFolder)
143
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Executable, executableName, DefaultVirtualEnvFolder);
180
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
223
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, virtualEnvironmentPath)
272
EntrypointType
.Executable,
331
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
339
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
456
var
entrypointType = entrypointAnnotation.Type;
523
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
615
case
EntrypointType
.Script:
618
case
EntrypointType
.Module:
621
case
EntrypointType
.Executable:
628
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
715
case
EntrypointType
.Script:
718
case
EntrypointType
.Module:
721
case
EntrypointType
.Executable:
878
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
879
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
930
var
entrypointType = entrypointAnnotation.Type;
936
if (entrypointType ==
EntrypointType
.Script)
990
if (annotation.Type ==
EntrypointType
.Module)
1001
else if (annotation.Type ==
EntrypointType
.Script)
1046
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1063
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1064
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1087
var
entrypointType = existingAnnotation.Type;
1093
case
EntrypointType
.Module:
1097
case
EntrypointType
.Script:
1100
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);
930
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
949
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
968
Assert.Equal(
EntrypointType
.Executable, entrypointAnnotation.Type);
1153
pythonBuilder.WithEntrypoint(
EntrypointType
.Module, "uvicorn")
1163
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
1189
pythonBuilder.WithEntrypoint(
EntrypointType
.Executable, "pytest");
1208
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1219
builder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1233
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, null!));
1237
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, string.Empty));