42 references to EntrypointType
Aspire.Hosting.Python (31)
PythonAppResourceBuilderExtensions.cs (30)
68=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 106=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Module, moduleName, DefaultVirtualEnvFolder) 147=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Executable, executableName, DefaultVirtualEnvFolder); 184return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 227return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, virtualEnvironmentPath) 276EntrypointType.Executable, 335IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 343IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 460var entrypointType = entrypointAnnotation.Type; 527string pythonVersion, EntrypointType entrypointType, string entrypoint) 619case EntrypointType.Script: 622case EntrypointType.Module: 625case EntrypointType.Executable: 632string pythonVersion, EntrypointType entrypointType, string entrypoint) 719case EntrypointType.Script: 722case EntrypointType.Module: 725case EntrypointType.Executable: 883EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint), 884EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 936var entrypointType = entrypointAnnotation.Type; 948if (entrypointType == EntrypointType.Script) 1035this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T : PythonAppResource 1052EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypoint), 1053EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 1077var entrypointType = existingAnnotation.Type; 1083case EntrypointType.Module: 1087case EntrypointType.Script: 1090case 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); 931Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 950Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 969Assert.Equal(EntrypointType.Executable, entrypointAnnotation.Type); 1154pythonBuilder.WithEntrypoint(EntrypointType.Module, "uvicorn") 1164Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 1186pythonBuilder.WithEntrypoint(EntrypointType.Executable, "pytest"); 1205resourceBuilder.WithEntrypoint(EntrypointType.Module, "flask")); 1216builder.WithEntrypoint(EntrypointType.Module, "flask")); 1230resourceBuilder.WithEntrypoint(EntrypointType.Module, null!)); 1234resourceBuilder.WithEntrypoint(EntrypointType.Module, string.Empty));