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