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