44 references to EntrypointType
Aspire.Hosting.Python (33)
PythonAppResourceBuilderExtensions.cs (32)
68=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 103=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Module, moduleName, DefaultVirtualEnvFolder) 141=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Executable, executableName, DefaultVirtualEnvFolder); 178return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 221return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, virtualEnvironmentPath) 269EntrypointType.Executable, 351IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 359IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 478var entrypointType = entrypointAnnotation.Type; 545string pythonVersion, EntrypointType entrypointType, string entrypoint) 637case EntrypointType.Script: 640case EntrypointType.Module: 643case EntrypointType.Executable: 650string pythonVersion, EntrypointType entrypointType, string entrypoint) 737case EntrypointType.Script: 740case EntrypointType.Module: 743case EntrypointType.Executable: 899EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint), 900EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 950var entrypointType = entrypointAnnotation.Type; 956if (entrypointType == EntrypointType.Script) 1010if (annotation.Type == EntrypointType.Module) 1021else if (annotation.Type == EntrypointType.Script) 1065this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T : PythonAppResource 1082EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypoint), 1083EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 1106var entrypointType = existingAnnotation.Type; 1112case EntrypointType.Module: 1116case EntrypointType.Script: 1119case EntrypointType.Executable:
PythonEntrypointAnnotation.cs (1)
16public required EntrypointType Type { get; set; }
Aspire.Hosting.Python.Tests (11)
AddPythonAppTests.cs (11)
219Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 896Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 915Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 934Assert.Equal(EntrypointType.Executable, entrypointAnnotation.Type); 1119pythonBuilder.WithEntrypoint(EntrypointType.Module, "uvicorn") 1129Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 1155pythonBuilder.WithEntrypoint(EntrypointType.Executable, "pytest"); 1174resourceBuilder.WithEntrypoint(EntrypointType.Module, "flask")); 1185builder.WithEntrypoint(EntrypointType.Module, "flask")); 1199resourceBuilder.WithEntrypoint(EntrypointType.Module, null!)); 1203resourceBuilder.WithEntrypoint(EntrypointType.Module, string.Empty));