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); 177return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 220return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, virtualEnvironmentPath) 268EntrypointType.Executable, 327IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 335IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 452var entrypointType = entrypointAnnotation.Type; 519string pythonVersion, EntrypointType entrypointType, string entrypoint) 611case EntrypointType.Script: 614case EntrypointType.Module: 617case EntrypointType.Executable: 624string pythonVersion, EntrypointType entrypointType, string entrypoint) 711case EntrypointType.Script: 714case EntrypointType.Module: 717case EntrypointType.Executable: 873EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint), 874EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 924var entrypointType = entrypointAnnotation.Type; 930if (entrypointType == EntrypointType.Script) 984if (annotation.Type == EntrypointType.Module) 995else if (annotation.Type == EntrypointType.Script) 1039this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T : PythonAppResource 1056EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypoint), 1057EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 1080var entrypointType = existingAnnotation.Type; 1086case EntrypointType.Module: 1090case EntrypointType.Script: 1093case 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); 919Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 938Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 957Assert.Equal(EntrypointType.Executable, entrypointAnnotation.Type); 1142pythonBuilder.WithEntrypoint(EntrypointType.Module, "uvicorn") 1152Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 1178pythonBuilder.WithEntrypoint(EntrypointType.Executable, "pytest"); 1197resourceBuilder.WithEntrypoint(EntrypointType.Module, "flask")); 1208builder.WithEntrypoint(EntrypointType.Module, "flask")); 1222resourceBuilder.WithEntrypoint(EntrypointType.Module, null!)); 1226resourceBuilder.WithEntrypoint(EntrypointType.Module, string.Empty));