42 references to EntrypointType
Aspire.Hosting.Python (31)
PythonAppResourceBuilderExtensions.cs (30)
68
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
106
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Module, moduleName, DefaultVirtualEnvFolder)
147
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Executable, executableName, DefaultVirtualEnvFolder);
184
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
227
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, virtualEnvironmentPath)
276
EntrypointType
.Executable,
335
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
343
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
460
var
entrypointType = entrypointAnnotation.Type;
527
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
619
case
EntrypointType
.Script:
622
case
EntrypointType
.Module:
625
case
EntrypointType
.Executable:
632
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
719
case
EntrypointType
.Script:
722
case
EntrypointType
.Module:
725
case
EntrypointType
.Executable:
883
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
884
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
936
var
entrypointType = entrypointAnnotation.Type;
948
if (entrypointType ==
EntrypointType
.Script)
1035
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1052
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1053
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1077
var
entrypointType = existingAnnotation.Type;
1083
case
EntrypointType
.Module:
1087
case
EntrypointType
.Script:
1090
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);
931
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
950
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
969
Assert.Equal(
EntrypointType
.Executable, entrypointAnnotation.Type);
1154
pythonBuilder.WithEntrypoint(
EntrypointType
.Module, "uvicorn")
1164
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
1186
pythonBuilder.WithEntrypoint(
EntrypointType
.Executable, "pytest");
1205
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1216
builder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1230
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, null!));
1234
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, string.Empty));