42 references to EntrypointType
Aspire.Hosting.Python (31)
PythonAppResourceBuilderExtensions.cs (30)
70=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 108=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Module, moduleName, DefaultVirtualEnvFolder) 149=> AddPythonAppCore(builder, name, appDirectory, EntrypointType.Executable, executableName, DefaultVirtualEnvFolder); 186return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 229return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, virtualEnvironmentPath) 278EntrypointType.Executable, 337IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 345IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 462var entrypointType = entrypointAnnotation.Type; 529string pythonVersion, EntrypointType entrypointType, string entrypoint) 621case EntrypointType.Script: 624case EntrypointType.Module: 627case EntrypointType.Executable: 634string pythonVersion, EntrypointType entrypointType, string entrypoint) 721case EntrypointType.Script: 724case EntrypointType.Module: 727case EntrypointType.Executable: 885EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint), 886EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 938var entrypointType = entrypointAnnotation.Type; 950if (entrypointType == EntrypointType.Script) 1037this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T : PythonAppResource 1054EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypoint), 1055EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 1079var entrypointType = existingAnnotation.Type; 1085case EntrypointType.Module: 1089case EntrypointType.Script: 1092case EntrypointType.Executable:
PythonEntrypointAnnotation.cs (1)
16public required EntrypointType Type { get; set; }
Aspire.Hosting.Python.Tests (11)
AddPythonAppTests.cs (11)
220Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 932Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 951Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 970Assert.Equal(EntrypointType.Executable, entrypointAnnotation.Type); 1155pythonBuilder.WithEntrypoint(EntrypointType.Module, "uvicorn") 1165Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 1187pythonBuilder.WithEntrypoint(EntrypointType.Executable, "pytest"); 1206resourceBuilder.WithEntrypoint(EntrypointType.Module, "flask")); 1217builder.WithEntrypoint(EntrypointType.Module, "flask")); 1231resourceBuilder.WithEntrypoint(EntrypointType.Module, null!)); 1235resourceBuilder.WithEntrypoint(EntrypointType.Module, string.Empty));