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, 350IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 358IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 475var entrypointType = entrypointAnnotation.Type; 542string pythonVersion, EntrypointType entrypointType, string entrypoint) 634case EntrypointType.Script: 637case EntrypointType.Module: 640case EntrypointType.Executable: 647string pythonVersion, EntrypointType entrypointType, string entrypoint) 734case EntrypointType.Script: 737case EntrypointType.Module: 740case EntrypointType.Executable: 896EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint), 897EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 947var entrypointType = entrypointAnnotation.Type; 953if (entrypointType == EntrypointType.Script) 1007if (annotation.Type == EntrypointType.Module) 1018else if (annotation.Type == EntrypointType.Script) 1062this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T : PythonAppResource 1079EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypoint), 1080EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 1103var entrypointType = existingAnnotation.Type; 1109case EntrypointType.Module: 1113case EntrypointType.Script: 1116case 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));