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,
327
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
335
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
452
var
entrypointType = entrypointAnnotation.Type;
519
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
611
case
EntrypointType
.Script:
614
case
EntrypointType
.Module:
617
case
EntrypointType
.Executable:
624
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
711
case
EntrypointType
.Script:
714
case
EntrypointType
.Module:
717
case
EntrypointType
.Executable:
873
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
874
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
924
var
entrypointType = entrypointAnnotation.Type;
930
if (entrypointType ==
EntrypointType
.Script)
984
if (annotation.Type ==
EntrypointType
.Module)
995
else if (annotation.Type ==
EntrypointType
.Script)
1039
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1056
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1057
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1080
var
entrypointType = existingAnnotation.Type;
1086
case
EntrypointType
.Module:
1090
case
EntrypointType
.Script:
1093
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));