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,
303
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
311
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
430
var
entrypointType = entrypointAnnotation.Type;
497
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
589
case
EntrypointType
.Script:
592
case
EntrypointType
.Module:
595
case
EntrypointType
.Executable:
602
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
665
case
EntrypointType
.Script:
668
case
EntrypointType
.Module:
671
case
EntrypointType
.Executable:
827
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
828
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
878
var
entrypointType = entrypointAnnotation.Type;
884
if (entrypointType ==
EntrypointType
.Script)
938
if (annotation.Type ==
EntrypointType
.Module)
949
else if (annotation.Type ==
EntrypointType
.Script)
993
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1010
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1011
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1034
var
entrypointType = existingAnnotation.Type;
1040
case
EntrypointType
.Module:
1044
case
EntrypointType
.Script:
1047
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));