1836 references to IResourceBuilder
Aspire.Hosting (283)
ApplicationModel\IResourceBuilder.cs (2)
29IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() => WithAnnotation(new TAnnotation(), behavior); 39IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation;
ApplicationModel\ResourceAnnotationMutationBehavior.cs (1)
7/// Specifies behavior of the <see cref="IResourceBuilder{T}.WithAnnotation{TAnnotation}(Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior)" />
ContainerResourceBuilderExtensions.cs (84)
20/// <returns>The <see cref="IResourceBuilder{T}"/> for chaining.</returns> 21public static IResourceBuilder<ContainerResource> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image) 37/// <returns>The <see cref="IResourceBuilder{T}"/> for chaining.</returns> 38public static IResourceBuilder<ContainerResource> AddContainer(this IDistributedApplicationBuilder builder, [ResourceName] string name, string image, string tag) 58/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 59public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string? name, string target, bool isReadOnly = false) where T : ContainerResource 74/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 75public static IResourceBuilder<T> WithVolume<T>(this IResourceBuilder<T> builder, string target) where T : ContainerResource 92/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 93public static IResourceBuilder<T> WithBindMount<T>(this IResourceBuilder<T> builder, string source, string target, bool isReadOnly = false) where T : ContainerResource 109/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 110public static IResourceBuilder<T> WithEntrypoint<T>(this IResourceBuilder<T> builder, string entrypoint) where T : ContainerResource 125/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 126public static IResourceBuilder<T> WithImageTag<T>(this IResourceBuilder<T> builder, string tag) where T : ContainerResource 146/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 147public static IResourceBuilder<T> WithImageRegistry<T>(this IResourceBuilder<T> builder, string? registry) where T : ContainerResource 167/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 168public static IResourceBuilder<T> WithImage<T>(this IResourceBuilder<T> builder, string image, string tag = "latest") where T : ContainerResource 193/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 194public static IResourceBuilder<T> WithImageSHA256<T>(this IResourceBuilder<T> builder, string sha256) where T : ContainerResource 212/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, string[])"/> method. 217/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 218public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, params string[] args) where T : ContainerResource 229/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, Action{CommandLineArgsCallbackContext})"/> method. 234/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 235public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Action<ContainerRuntimeArgsCallbackContext> callback) where T : ContainerResource 251/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, Func{CommandLineArgsCallbackContext, Task})"/> method. 256/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 257public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Func<ContainerRuntimeArgsCallbackContext, Task> callback) where T : ContainerResource 272/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 284public static IResourceBuilder<T> WithLifetime<T>(this IResourceBuilder<T> builder, ContainerLifetime lifetime) where T : ContainerResource 291private static IResourceBuilder<T> ThrowResourceIsNotContainer<T>(IResourceBuilder<T> builder) where T : ContainerResource 300/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 301public static IResourceBuilder<T> PublishAsContainer<T>(this IResourceBuilder<T> builder) where T : ContainerResource 312/// <param name="builder">The <see cref="IResourceBuilder{T}"/>.</param> 316/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 329/// When generating the manifest for deployment tools, the <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/> 345public static IResourceBuilder<T> WithDockerfile<T>(this IResourceBuilder<T> builder, string contextPath, string? dockerfilePath = null, string? stage = null) where T : ContainerResource 382/// <returns>A <see cref="IResourceBuilder{ContainerResource}"/>.</returns> 405public static IResourceBuilder<ContainerResource> AddDockerfile(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, string? dockerfilePath = null, string? stage = null) 427/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 428public static IResourceBuilder<T> WithContainerName<T>(this IResourceBuilder<T> builder, string name) where T : ContainerResource 443/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 445/// Thrown when <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, object)"/> is 446/// called before <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>. 450/// The <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, object)"/> extension method 452/// <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>. 467public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, object value) where T : ContainerResource 492/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 494/// Thrown when <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> is 495/// called before <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>. 499/// The <see cref="ContainerResourceBuilderExtensions.WithBuildArg{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> extension method 501/// <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>. 518public static IResourceBuilder<T> WithBuildArg<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T : ContainerResource 539/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 541/// Thrown when <see cref="ContainerResourceBuilderExtensions.WithBuildSecret{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> is 542/// called before <see cref="ContainerResourceBuilderExtensions.WithDockerfile{T}(IResourceBuilder{T}, string, string?, string?)"/>. 546/// The <see cref="ContainerResourceBuilderExtensions.WithBuildSecret{T}(IResourceBuilder{T}, string, IResourceBuilder{ParameterResource})"/> extension method 565public static IResourceBuilder<T> WithBuildSecret<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) where T : ContainerResource
CustomResourceExtensions.cs (2)
20public static IResourceBuilder<TResource> WithInitialState<TResource>(this IResourceBuilder<TResource> builder, CustomResourceSnapshot initialSnapshot)
Dashboard\ConsoleLogsConfigurationExtensions.cs (2)
10internal static IResourceBuilder<T> ConfigureConsoleLogs<T>(this IResourceBuilder<T> builder) where T : IResourceWithEnvironment
DistributedApplicationBuilder.cs (2)
428public IResourceBuilder<T> AddResource<T>(T resource) where T : IResource 442public IResourceBuilder<T> CreateResourceBuilder<T>(T resource) where T : IResource
DistributedApplicationResourceBuilder.cs (2)
8internal sealed class DistributedApplicationResourceBuilder<T>(IDistributedApplicationBuilder applicationBuilder, T resource) : IResourceBuilder<T> where T : IResource 14public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
ExecutableResourceBuilderExtensions.cs (7)
23/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 24public static IResourceBuilder<ExecutableResource> AddExecutable(this IDistributedApplicationBuilder builder, [ResourceName] string name, string command, string workingDirectory, params string[]? args) 42/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 43public static IResourceBuilder<ExecutableResource> AddExecutable(this IDistributedApplicationBuilder builder, [ResourceName] string name, string command, string workingDirectory, params object[]? args) 71/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 72public static IResourceBuilder<T> PublishAsDockerFile<T>(this IResourceBuilder<T> builder, IEnumerable<DockerBuildArg>? buildArgs = null) where T : ExecutableResource
IDistributedApplicationBuilder.cs (8)
95/// the <see cref="IResourceBuilder{T}.ApplicationBuilder"/>. In this case an extension method is used to generate a stable node name for RabbitMQ for local 144/// method. Other extension methods (such as <see cref="ContainerResourceBuilderExtensions.WithImage{T}(IResourceBuilder{T}, string, string)"/> 155IResourceBuilder<T> AddResource<T>(T resource) where T : IResource; 165/// The <see cref="CreateResourceBuilder{T}(T)"/> method is used to create an <see cref="IResourceBuilder{T}"/> for a specific 175/// Calling extension methods on the <see cref="IResourceBuilder{T}"/> typically results in modifications to the <see cref="IResource.Annotations"/> 188/// is <see cref="IResourceBuilder{IResourceWithConnectionString}"/>. The <see cref="ParameterResource"/> type does not implement the <see cref="IResourceWithConnectionString"/>. 193/// <see cref="CreateResourceBuilder{T}(T)"/> method assists by allowing the creation of a <see cref="IResourceBuilder{T}"/> without adding 211IResourceBuilder<T> CreateResourceBuilder<T>(T resource) where T : IResource;
OtlpConfigurationExtensions.cs (3)
116/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 117public static IResourceBuilder<T> WithOtlpExporter<T>(this IResourceBuilder<T> builder) where T : IResourceWithEnvironment
ParameterResourceBuilderExtensions.cs (15)
25public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, bool secret = false) 45public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, string value, bool publishValueAsDefault = false, bool secret = false) 66public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, string name, Func<string> valueGetter, bool publishValueAsDefault = false, bool secret = false) 95public static IResourceBuilder<ParameterResource> AddParameterFromConfiguration(this IDistributedApplicationBuilder builder, string name, string configurationKey, bool secret = false) 122public static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, [ResourceName] string name, ParameterDefault value, bool secret = false, bool persist = false) 149internal static IResourceBuilder<ParameterResource> AddParameter(this IDistributedApplicationBuilder builder, 210/// Adds a parameter to the distributed application but wrapped in a resource with a connection string for use with <see cref="ResourceBuilderExtensions.WithReference{TDestination}(IResourceBuilder{TDestination}, IResourceBuilder{IResourceWithConnectionString}, string?, bool)"/> 217public static IResourceBuilder<IResourceWithConnectionString> AddConnectionString(this IDistributedApplicationBuilder builder, [ResourceName] string name, string? environmentVariableName = null) 222var parameterBuilder = builder.AddParameter(name, _ => 238/// <returns>The configured <see cref="IResourceBuilder{T}"/>.</returns> 239public static IResourceBuilder<T> PublishAsConnectionString<T>(this IResourceBuilder<T> builder) 251/// <param name="builder">The <see cref="IResourceBuilder{T}"/>.</param> 252public static void ConfigureConnectionStringManifestPublisher(IResourceBuilder<IResourceWithConnectionString> builder)
ProjectResourceBuilderExtensions.cs (29)
28/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 61public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name) where TProject : IProjectMetadata, new() 75/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 94public static IResourceBuilder<ProjectResource> AddProject(this IDistributedApplicationBuilder builder, [ResourceName] string name, string projectPath) 111/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 141public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name, string? launchProfileName) where TProject : IProjectMetadata, new() 160/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 179public static IResourceBuilder<ProjectResource> AddProject(this IDistributedApplicationBuilder builder, [ResourceName] string name, string projectPath, string? launchProfileName) 199/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 228public static IResourceBuilder<ProjectResource> AddProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name, Action<ProjectResourceOptions> configure) where TProject : IProjectMetadata, new() 250/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 268public static IResourceBuilder<ProjectResource> AddProject(this IDistributedApplicationBuilder builder, [ResourceName] string name, string projectPath, Action<ProjectResourceOptions> configure) 287private static IResourceBuilder<ProjectResource> WithProjectDefaults(this IResourceBuilder<ProjectResource> builder, ProjectResourceOptions options) 541/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 546/// reverse proxy for each process. When <see cref="WithReplicas(IResourceBuilder{ProjectResource}, int)"/> is 563public static IResourceBuilder<ProjectResource> WithReplicas(this IResourceBuilder<ProjectResource> builder, int replicas) 575/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 584/// into the project and set to true. If the <see cref="DisableForwardedHeaders(IResourceBuilder{ProjectResource})"/> 597public static IResourceBuilder<ProjectResource> DisableForwardedHeaders(this IResourceBuilder<ProjectResource> builder) 611/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 612public static IResourceBuilder<ProjectResource> WithEndpointsInEnvironment( 613this IResourceBuilder<ProjectResource> builder, Func<EndpointAnnotation, bool> filter) 644private static void SetAspNetCoreUrls(this IResourceBuilder<ProjectResource> builder) 691private static void SetBothPortsEnvVariables(this IResourceBuilder<ProjectResource> builder) 700private static void SetOnePortsEnvVariable(this IResourceBuilder<ProjectResource> builder, EnvironmentCallbackContext context, string portEnvVariable, string scheme) 735private static void SetKestrelUrlOverrideEnvVariables(this IResourceBuilder<ProjectResource> builder)
ResourceBuilderExtensions.cs (124)
29/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 30public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, string? value) where T : IResourceWithEnvironment 45/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 46public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, in ReferenceExpression.ExpressionInterpolatedStringHandler value) 67/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 68public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value) 88/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 89public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, Func<string> callback) where T : IResourceWithEnvironment 104/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 105public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, Action<EnvironmentCallbackContext> callback) where T : IResourceWithEnvironment 119/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 120public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, Func<EnvironmentCallbackContext, Task> callback) where T : IResourceWithEnvironment 135/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 136public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference) where T : IResourceWithEnvironment 155/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 156public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> parameter) where T : IResourceWithEnvironment 175/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 176public static IResourceBuilder<T> WithEnvironment<T>( 177this IResourceBuilder<T> builder, 179IResourceBuilder<IResourceWithConnectionString> resource) 198/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 199public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, params string[] args) where T : IResourceWithArgs 213/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 214public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, params object[] args) where T : IResourceWithArgs 228/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 229public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, Action<CommandLineArgsCallbackContext> callback) where T : IResourceWithArgs 247/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 248public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, Func<CommandLineArgsCallbackContext, Task> callback) where T : IResourceWithArgs 262/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 263public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Action<ManifestPublishingContext> callback) where T : IResource 278/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 279public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Func<ManifestPublishingContext, Task> callback) where T : IResource 294/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 295public static IResourceBuilder<T> WithConnectionStringRedirection<T>(this IResourceBuilder<T> builder, IResourceWithConnectionString resource) where T : IResourceWithConnectionString 343/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 344public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IResourceWithConnectionString> source, string? connectionName = null, bool optional = false) 370/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 371public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IResourceWithServiceDiscovery> source) 389/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 390public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, string name, Uri uri) 417/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 418public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference) 428private static void ApplyEndpoints<T>(this IResourceBuilder<T> builder, IResourceWithEndpoints resourceWithEndpoints, string? endpointName = null) 469/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 471public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints 502/// Exposes an endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>. 514/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 517public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, string? scheme = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true, bool? isExternal = null) where T : IResourceWithEndpoints 552/// Exposes an HTTP endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>. 562/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 564public static IResourceBuilder<T> WithHttpEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true) where T : IResourceWithEndpoints 572/// Exposes an HTTPS endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>. 582/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 584public static IResourceBuilder<T> WithHttpsEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true) where T : IResourceWithEndpoints 596/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 597public static IResourceBuilder<T> WithExternalHttpEndpoints<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 618/// Gets an <see cref="EndpointReference"/> by name from the resource. These endpoints are declared either using <see cref="WithEndpoint{T}(IResourceBuilder{T}, int?, int?, string?, string?, string?, bool, bool?)"/> or by launch settings (for project resources). 619/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 625public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 637/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 638public static IResourceBuilder<T> AsHttp2Service<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 650/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 651public static IResourceBuilder<T> ExcludeFromManifest<T>(this IResourceBuilder<T> builder) where T : IResource 664/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 669/// resources, calling <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> also results 672/// <para>The <see cref="WithHealthCheck{T}(IResourceBuilder{T}, string)"/> method can be used to associate 685public static IResourceBuilder<T> WaitFor<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency) where T : IResourceWithWaitSupport 705var parentBuilder = builder.ApplicationBuilder.CreateResourceBuilder(dependencyResourceWithParent.Parent); 721/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 740public static IResourceBuilder<T> WaitForCompletion<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency, int exitCode = 0) where T : IResourceWithWaitSupport 766/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 769/// The <see cref="WithHealthCheck{T}(IResourceBuilder{T}, string)"/> method is used in conjunction with 770/// the <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> to associate a resource 771/// registered in the application hosts dependency injection container. The <see cref="WithHealthCheck{T}(IResourceBuilder{T}, string)"/> 796public static IResourceBuilder<T> WithHealthCheck<T>(this IResourceBuilder<T> builder, string key) where T : IResource 819/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 840public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 853internal static IResourceBuilder<T> WithHttpHealthCheckInternal<T>(this IResourceBuilder<T> builder, string desiredScheme, string endpointName, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 914/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 935public static IResourceBuilder<T> WithHttpsHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 977/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 983public static IResourceBuilder<T> WithCommand<T>( 984this IResourceBuilder<T> builder, 1034public static IResourceBuilder<T> WithRelationship<T>( 1035this IResourceBuilder<T> builder,
Utils\ImageNameGenerator.cs (1)
12public static string GenerateImageName<T>(this IResourceBuilder<T> builder) where T: IResource
Utils\VolumeNameGenerator.cs (1)
21public static string Generate<T>(IResourceBuilder<T> builder, string suffix) where T : IResource
Aspire.Hosting.Azure (56)
AzureBicepResourceExtensions.cs (47)
22/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 23public static IResourceBuilder<AzureBicepResource> AddBicepTemplate(this IDistributedApplicationBuilder builder, [ResourceName] string name, string bicepFile) 39/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 40public static IResourceBuilder<AzureBicepResource> AddBicepTemplateString(this IDistributedApplicationBuilder builder, [ResourceName] string name, string bicepContent) 55public static BicepOutputReference GetOutput(this IResourceBuilder<AzureBicepResource> builder, string name) 66public static BicepSecretOutputReference GetSecretOutput(this IResourceBuilder<AzureBicepResource> builder, string name) 78/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 79public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, BicepOutputReference bicepOutputReference) 95/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 96public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, BicepSecretOutputReference bicepOutputReference) 111/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 112public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name) 127/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 128public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, string value) 143/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 144public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, IEnumerable<string> value) 159/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 160public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, JsonNode value) 175/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 176public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, Func<object?> valueCallback) 191/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 192public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<ParameterResource> value) 205/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 206public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, ParameterResource value) 221/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 222public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, IResourceBuilder<IResourceWithConnectionString> value) 237/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 238public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, BicepOutputReference value) 253/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 254public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value) 269/// <returns>An <see cref="IResourceBuilder{T}"/>.</returns> 270public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, EndpointReference value)
AzureProvisioningResourceExtensions.cs (5)
23public static IResourceBuilder<AzureProvisioningResource> AddAzureInfrastructure(this IDistributedApplicationBuilder builder, [ResourceName] string name, Action<AzureResourceInfrastructure> configureInfrastructure) 39public static IResourceBuilder<T> ConfigureInfrastructure<T>(this IResourceBuilder<T> builder, Action<AzureResourceInfrastructure> configure) 54/// The <see cref="IResourceBuilder{ParameterResource}"/> that represents a parameter in the <see cref="Aspire.Hosting.ApplicationModel" /> 67public static ProvisioningParameter AsProvisioningParameter(this IResourceBuilder<ParameterResource> parameterResourceBuilder, AzureResourceInfrastructure infrastructure, string? parameterName = null)
AzureResourceExtensions.cs (4)
19/// <returns>The configured <see cref="IResourceBuilder{T}"/>.</returns> 20public static IResourceBuilder<T> PublishAsConnectionString<T>(this IResourceBuilder<T> builder) 23ParameterResourceBuilderExtensions.ConfigureConnectionStringManifestPublisher((IResourceBuilder<IResourceWithConnectionString>)builder);
Aspire.Hosting.Azure.AppConfiguration (2)
AzureAppConfigurationExtensions.cs (2)
21/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 22public static IResourceBuilder<AzureAppConfigurationResource> AddAzureAppConfiguration(this IDistributedApplicationBuilder builder, [ResourceName] string name)
Aspire.Hosting.Azure.AppContainers (16)
AzureContainerAppContainerExtensions.cs (2)
34public static IResourceBuilder<T> PublishAsAzureContainerApp<T>(this IResourceBuilder<T> container, Action<AzureResourceInfrastructure, ContainerApp> configure) where T : ContainerResource
AzureContainerAppProjectExtensions.cs (2)
34public static IResourceBuilder<T> PublishAsAzureContainerApp<T>(this IResourceBuilder<T> project, Action<AzureResourceInfrastructure, ContainerApp> configure)
ContainerAppExtensions.cs (12)
26/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> extension method 28/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method is used 29/// in conjunction with the <see cref="AzureContainerAppContainerExtensions.PublishAsAzureContainerApp{T}(IResourceBuilder{T}, Action{AzureResourceInfrastructure, ContainerApp})"/> 31/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method takes 43/// passing them to the <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> 44/// method via the <see cref="AzureContainerAppContainerExtensions.PublishAsAzureContainerApp{T}(IResourceBuilder{T}, Action{AzureResourceInfrastructure, ContainerApp})"/> 58public static void ConfigureCustomDomain(this ContainerApp app, IResourceBuilder<ParameterResource> customDomain, IResourceBuilder<ParameterResource> certificateName)
Aspire.Hosting.Azure.ApplicationInsights (5)
AzureApplicationInsightsExtensions.cs (5)
22/// <returns>A reference to the <see cref="IResourceBuilder{AzureApplicationInsightsResource}"/>.</returns> 23public static IResourceBuilder<AzureApplicationInsightsResource> AddAzureApplicationInsights(this IDistributedApplicationBuilder builder, [ResourceName] string name) 34/// <returns>A reference to the <see cref="IResourceBuilder{AzureApplicationInsightsResource}"/>.</returns> 35public static IResourceBuilder<AzureApplicationInsightsResource> AddAzureApplicationInsights(this IDistributedApplicationBuilder builder, [ResourceName] string name, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>? logAnalyticsWorkspace)
Aspire.Hosting.Azure.CognitiveServices (5)
AzureOpenAIExtensions.cs (5)
22/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 23public static IResourceBuilder<AzureOpenAIResource> AddAzureOpenAI(this IDistributedApplicationBuilder builder, [ResourceName] string name) 111/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 112public static IResourceBuilder<AzureOpenAIResource> AddDeployment(this IResourceBuilder<AzureOpenAIResource> builder, AzureOpenAIDeployment deployment)
Aspire.Hosting.Azure.CosmosDB (17)
AzureCosmosDBExtensions.cs (17)
29/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 30public static IResourceBuilder<AzureCosmosDBResource> AddAzureCosmosDB(this IDistributedApplicationBuilder builder, [ResourceName] string name) 64var azureResourceBuilder = builder.CreateResourceBuilder(azureResource); 104/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 110public static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResourceBuilder<AzureCosmosDBResource> builder, Action<IResourceBuilder<AzureCosmosDBEmulatorResource>>? configureContainer = null) 150var surrogateBuilder = builder.ApplicationBuilder.CreateResourceBuilder(surrogate); 184public static IResourceBuilder<AzureCosmosDBEmulatorResource> WithDataVolume(this IResourceBuilder<AzureCosmosDBEmulatorResource> builder, string? name = null) 194public static IResourceBuilder<AzureCosmosDBEmulatorResource> WithGatewayPort(this IResourceBuilder<AzureCosmosDBEmulatorResource> builder, int? port) 211public static IResourceBuilder<AzureCosmosDBEmulatorResource> WithPartitionCount(this IResourceBuilder<AzureCosmosDBEmulatorResource> builder, int count) 226/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 227public static IResourceBuilder<AzureCosmosDBResource> AddDatabase(this IResourceBuilder<AzureCosmosDBResource> builder, string databaseName)
Aspire.Hosting.Azure.EventHubs (15)
AzureEventHubsExtensions.cs (15)
27public static IResourceBuilder<AzureEventHubsResource> AddAzureEventHubs( 85public static IResourceBuilder<AzureEventHubsResource> AddEventHub(this IResourceBuilder<AzureEventHubsResource> builder, [ResourceName] string name) 96/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 113public static IResourceBuilder<AzureEventHubsResource> RunAsEmulator(this IResourceBuilder<AzureEventHubsResource> builder, Action<IResourceBuilder<AzureEventHubsEmulatorResource>>? configureContainer = null) 145var storageResource = builder.ApplicationBuilder 193var surrogateBuilder = builder.ApplicationBuilder.CreateResourceBuilder(surrogate); 261public static IResourceBuilder<AzureEventHubsEmulatorResource> WithDataBindMount(this IResourceBuilder<AzureEventHubsEmulatorResource> builder, string? path = null) 270public static IResourceBuilder<AzureEventHubsEmulatorResource> WithDataVolume(this IResourceBuilder<AzureEventHubsEmulatorResource> builder, string? name = null) 279public static IResourceBuilder<AzureEventHubsEmulatorResource> WithGatewayPort(this IResourceBuilder<AzureEventHubsEmulatorResource> builder, int? port)
Aspire.Hosting.Azure.Functions (11)
AzureFunctionsProjectResourceExtensions.cs (11)
35/// <returns>An <see cref="IResourceBuilder{AzureFunctionsProjectResource}"/> for the added Azure Functions project resource.</returns> 36public static IResourceBuilder<AzureFunctionsProjectResource> AddAzureFunctionsProject<TProject>(this IDistributedApplicationBuilder builder, [ResourceName] string name) where TProject : IProjectMetadata, new() 154/// <returns>An <see cref="IResourceBuilder{AzureFunctionsProjectResource}"/> for the Azure Functions project resource with the endpoint configured.</returns> 155private static IResourceBuilder<AzureFunctionsProjectResource> WithFunctionsHttpEndpoint(this IResourceBuilder<AzureFunctionsProjectResource> builder) 190public static IResourceBuilder<AzureFunctionsProjectResource> WithHostStorage(this IResourceBuilder<AzureFunctionsProjectResource> builder, IResourceBuilder<AzureStorageResource> storage) 204public static IResourceBuilder<AzureFunctionsProjectResource> WithReference<TSource>(this IResourceBuilder<AzureFunctionsProjectResource> destination, IResourceBuilder<TSource> source, string? connectionName = null)
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResourceExtensions.cs (2)
22/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 23public static IResourceBuilder<AzureKeyVaultResource> AddAzureKeyVault(this IDistributedApplicationBuilder builder, [ResourceName] string name)
Aspire.Hosting.Azure.OperationalInsights (2)
AzureLogAnalyticsWorkspaceExtensions.cs (2)
21/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 22public static IResourceBuilder<AzureLogAnalyticsWorkspaceResource> AddAzureLogAnalyticsWorkspace(this IDistributedApplicationBuilder builder, [ResourceName] string name)
Aspire.Hosting.Azure.PostgreSQL (30)
AzurePostgresExtensions.cs (30)
19private static IResourceBuilder<T> WithLoginAndPassword<T>(this IResourceBuilder<T> builder, PostgresServerResource postgresResource) where T : AzureBicepResource 31private static IResourceBuilder<PostgresServerResource> PublishAsAzurePostgresFlexibleServerInternal( 32this IResourceBuilder<PostgresServerResource> builder, 69var resourceBuilder = builder.ApplicationBuilder.CreateResourceBuilder(resource) 92/// <param name="builder">The <see cref="IResourceBuilder{PostgresServerResource}"/> builder.</param> 93/// <returns>A reference to the <see cref="IResourceBuilder{PostgresServerResource}"/> builder.</returns> 95public static IResourceBuilder<PostgresServerResource> PublishAsAzurePostgresFlexibleServer( 96this IResourceBuilder<PostgresServerResource> builder) 104/// <param name="builder">The <see cref="IResourceBuilder{PostgresServerResource}"/> builder.</param> 105/// <returns>A reference to the <see cref="IResourceBuilder{PostgresServerResource}"/> builder.</returns> 107public static IResourceBuilder<PostgresServerResource> AsAzurePostgresFlexibleServer( 108this IResourceBuilder<PostgresServerResource> builder) 118/// <returns>A reference to the <see cref="IResourceBuilder{AzurePostgresFlexibleServerResource}"/> builder.</returns> 139public static IResourceBuilder<AzurePostgresFlexibleServerResource> AddAzurePostgresFlexibleServer(this IDistributedApplicationBuilder builder, [ResourceName] string name) 154/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 155public static IResourceBuilder<AzurePostgresFlexibleServerDatabaseResource> AddDatabase(this IResourceBuilder<AzurePostgresFlexibleServerResource> builder, [ResourceName] string name, string? databaseName = null) 175var innerBuilder = builder.ApplicationBuilder.CreateResourceBuilder(azureResource.InnerResource); 189/// <returns>A reference to the <see cref="IResourceBuilder{AzurePostgresFlexibleServerResource}"/> builder.</returns> 205public static IResourceBuilder<AzurePostgresFlexibleServerResource> RunAsContainer(this IResourceBuilder<AzurePostgresFlexibleServerResource> builder, Action<IResourceBuilder<PostgresServerResource>>? configureContainer = null) 227var postgresContainer = builder.ApplicationBuilder.AddPostgres( 265/// <returns>A reference to the <see cref="IResourceBuilder{AzurePostgresFlexibleServerResource}"/> builder.</returns> 280public static IResourceBuilder<AzurePostgresFlexibleServerResource> WithPasswordAuthentication( 281this IResourceBuilder<AzurePostgresFlexibleServerResource> builder, 282IResourceBuilder<ParameterResource>? userName = null, 283IResourceBuilder<ParameterResource>? password = null) 463private static ParameterResource CreateDefaultUserNameParameter<T>(IResourceBuilder<T> builder) where T : AzureBicepResource
Aspire.Hosting.Azure.Redis (21)
AzureRedisExtensions.cs (21)
23/// <param name="builder">The <see cref="IResourceBuilder{RedisResource}"/> builder.</param> 24/// <returns>A reference to the <see cref="IResourceBuilder{RedisResource}"/> builder.</returns> 26public static IResourceBuilder<RedisResource> PublishAsAzureRedis(this IResourceBuilder<RedisResource> builder) 32private static IResourceBuilder<RedisResource> PublishAsAzureRedisInternal(this IResourceBuilder<RedisResource> builder, bool useProvisioner) 60var resourceBuilder = builder.ApplicationBuilder.CreateResourceBuilder(resource) 82/// <param name="builder">The <see cref="IResourceBuilder{RedisResource}"/> builder.</param> 83/// <returns>A reference to the <see cref="IResourceBuilder{RedisResource}"/> builder.</returns> 85public static IResourceBuilder<RedisResource> AsAzureRedis(this IResourceBuilder<RedisResource> builder) 95/// <returns>A reference to the <see cref="IResourceBuilder{AzureRedisCacheResource}"/> builder.</returns> 116public static IResourceBuilder<AzureRedisCacheResource> AddAzureRedis( 132/// <returns>A reference to the <see cref="IResourceBuilder{AzureRedisCacheResource}"/> builder.</returns> 148public static IResourceBuilder<AzureRedisCacheResource> RunAsContainer( 149this IResourceBuilder<AzureRedisCacheResource> builder, 150Action<IResourceBuilder<RedisResource>>? configureContainer = null) 160var redisContainer = builder.ApplicationBuilder.AddRedis(azureResource.Name); 173/// <returns>A reference to the <see cref="IResourceBuilder{AzureRedisCacheResource}"/> builder.</returns> 188public static IResourceBuilder<AzureRedisCacheResource> WithAccessKeyAuthentication( 189this IResourceBuilder<AzureRedisCacheResource> builder)
Aspire.Hosting.Azure.Search (2)
AzureSearchExtensions.cs (2)
22/// <returns>A reference to the <see cref="IResourceBuilder{AzureSearchResource}"/>.</returns> 23public static IResourceBuilder<AzureSearchResource> AddAzureSearch(this IDistributedApplicationBuilder builder, [ResourceName] string name)
Aspire.Hosting.Azure.ServiceBus (9)
AzureServiceBusExtensions.cs (9)
22public static IResourceBuilder<AzureServiceBusResource> AddAzureServiceBus(this IDistributedApplicationBuilder builder, [ResourceName] string name) 99public static IResourceBuilder<AzureServiceBusResource> AddTopic(this IResourceBuilder<AzureServiceBusResource> builder, [ResourceName] string name, string[] subscriptions) 114public static IResourceBuilder<AzureServiceBusResource> AddQueue(this IResourceBuilder<AzureServiceBusResource> builder, [ResourceName] string name) 125public static IResourceBuilder<AzureServiceBusResource> AddTopic(this IResourceBuilder<AzureServiceBusResource> builder, [ResourceName] string name) 137public static IResourceBuilder<AzureServiceBusResource> AddSubscription(this IResourceBuilder<AzureServiceBusResource> builder, string topicName, string subscriptionName)
Aspire.Hosting.Azure.SignalR (2)
AzureSignalRExtensions.cs (2)
21/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 22public static IResourceBuilder<AzureSignalRResource> AddAzureSignalR(this IDistributedApplicationBuilder builder, [ResourceName] string name)
Aspire.Hosting.Azure.Sql (23)
AzureSqlExtensions.cs (23)
18private static IResourceBuilder<SqlServerServerResource> PublishAsAzureSqlDatabase(this IResourceBuilder<SqlServerServerResource> builder, bool useProvisioner) 28var azureSqlDatabase = builder.ApplicationBuilder.CreateResourceBuilder(resource); 51/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 53public static IResourceBuilder<SqlServerServerResource> PublishAsAzureSqlDatabase(this IResourceBuilder<SqlServerServerResource> builder) 62/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 64public static IResourceBuilder<SqlServerServerResource> AsAzureSqlDatabase(this IResourceBuilder<SqlServerServerResource> builder) 74/// <returns>A reference to the <see cref="IResourceBuilder{AzureSqlServerResource}"/> builder.</returns> 75public static IResourceBuilder<AzureSqlServerResource> AddAzureSqlServer(this IDistributedApplicationBuilder builder, [ResourceName] string name) 86var azureSqlServer = builder.AddResource(resource) 98/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 99public static IResourceBuilder<AzureSqlDatabaseResource> AddDatabase(this IResourceBuilder<AzureSqlServerResource> builder, [ResourceName] string name, string? databaseName = null) 119var innerBuilder = builder.ApplicationBuilder.CreateResourceBuilder(azureResource.InnerResource); 120var innerDb = innerBuilder.AddDatabase(name, databaseName); 133/// <returns>A reference to the <see cref="IResourceBuilder{AzureSqlServerResource}"/> builder.</returns> 149public static IResourceBuilder<AzureSqlServerResource> RunAsContainer(this IResourceBuilder<AzureSqlServerResource> builder, Action<IResourceBuilder<SqlServerServerResource>>? configureContainer = null) 164var sqlContainer = builder.ApplicationBuilder.AddSqlServer(azureResource.Name); 175var innerDb = sqlContainer.AddDatabase(database.Key, database.Value);
Aspire.Hosting.Azure.Storage (28)
AzureStorageExtensions.cs (28)
27public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistributedApplicationBuilder builder, [ResourceName] string name) 88/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 89public static IResourceBuilder<AzureStorageResource> RunAsEmulator(this IResourceBuilder<AzureStorageResource> builder, Action<IResourceBuilder<AzureStorageEmulatorResource>>? configureContainer = null) 132var surrogateBuilder = builder.ApplicationBuilder.CreateResourceBuilder(surrogate); 158public static IResourceBuilder<AzureStorageEmulatorResource> WithDataBindMount(this IResourceBuilder<AzureStorageEmulatorResource> builder, string? path = null, bool isReadOnly = false) 168public static IResourceBuilder<AzureStorageEmulatorResource> WithDataVolume(this IResourceBuilder<AzureStorageEmulatorResource> builder, string? name = null, bool isReadOnly = false) 177public static IResourceBuilder<AzureStorageEmulatorResource> WithBlobPort(this IResourceBuilder<AzureStorageEmulatorResource> builder, int port) 191public static IResourceBuilder<AzureStorageEmulatorResource> WithQueuePort(this IResourceBuilder<AzureStorageEmulatorResource> builder, int port) 205public static IResourceBuilder<AzureStorageEmulatorResource> WithTablePort(this IResourceBuilder<AzureStorageEmulatorResource> builder, int port) 216/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param> 218/// <returns>An <see cref="IResourceBuilder{T}"/> for the <see cref="AzureBlobStorageResource"/>.</returns> 219public static IResourceBuilder<AzureBlobStorageResource> AddBlobs(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name) 228/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param> 230/// <returns>An <see cref="IResourceBuilder{T}"/> for the <see cref="AzureTableStorageResource"/>.</returns> 231public static IResourceBuilder<AzureTableStorageResource> AddTables(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name) 240/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for <see cref="AzureStorageResource"/>/</param> 242/// <returns>An <see cref="IResourceBuilder{T}"/> for the <see cref="AzureQueueStorageResource"/>.</returns> 243public static IResourceBuilder<AzureQueueStorageResource> AddQueues(this IResourceBuilder<AzureStorageResource> builder, [ResourceName] string name)
Aspire.Hosting.Azure.Tests (168)
AzureBicepProvisionerTests.cs (6)
20var bicep0 = builder.AddBicepTemplateString("bicep0", "param name string") 35var container = builder.AddContainer("foo", "image") 44var connectionStringResource = builder.CreateResourceBuilder( 47var param = builder.AddParameter("param"); 163var bicep0 = builder.AddBicepTemplateString("bicep0", "param name string") 168var bicep1 = builder.AddBicepTemplateString("bicep1", "param name string")
AzureBicepResourceTests.cs (83)
31var bicepResource = builder.AddBicepTemplateString("mytemplate", "content") 40public static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> AzureExtensions => 43private static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> CreateAllAzureExtensions(string resourceName) 82public void AzureExtensionsAutomaticallyAddAzureProvisioning(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource) 94public void BicepResourcesAreIdempotent(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource) 97var azureResourceBuilder = addAzureResource(builder); 110public static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> AzureExtensionsWithHyphen => 115public void AzureResourcesProduceValidBicep(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource) 118var azureResourceBuilder = addAzureResource(builder); 136var bicepResource = builder.AddBicepTemplateString("templ", "content"); 148var bicepResource = builder.AddBicepTemplateString("templ", "content"); 160var bicepResource = builder.AddBicepTemplateString("templ", "content"); 170var bicepResource = builder.AddBicepTemplateString("templ", "content"); 180var param = builder.AddParameter("p1"); 182var b2 = builder.AddBicepTemplateString("temp2", "content"); 224var cosmos = builder.AddAzureCosmosDB("cosmos").RunAsEmulator(e => 246var cosmos = builder.AddAzureCosmosDB("cosmos") 340var cosmos = builder.AddAzureCosmosDB("cosmos") 433var appConfig = builder.AddAzureAppConfiguration("appConfig"); 499var appInsights = builder.AddAzureApplicationInsights("appInsights"); 556var appInsights = builder.AddAzureApplicationInsights("appInsights"); 621var law = builder.AddAzureLogAnalyticsWorkspace("mylaw"); 622var appInsights = builder.AddAzureApplicationInsights("appInsights", law); 679var logAnalyticsWorkspace = builder.AddAzureLogAnalyticsWorkspace("logAnalyticsWorkspace"); 721var appInsights = builder.AddAzureApplicationInsights("ai"); 725var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true) 738var infrastructure1 = builder.AddAzureInfrastructure("infrastructure1", (infrastructure) => 760var skuName = builder.AddParameter("skuName"); 763var infrastructure1 = builder.AddAzureInfrastructure("infrastructure1", (infrastructure) => 799var skuName = builder.AddParameter("skuName"); 802var infrastructure1 = builder.AddAzureInfrastructure("infrastructure1", (infrastructure) => 838var redis = builder.AddRedis("cache") 905var mykv = builder.AddAzureKeyVault("mykv"); 967var mykv = builder.AddAzureKeyVault("mykv"); 1029var signalr = builder.AddAzureSignalR("signalr"); 1102var sql = builder.AddSqlServer("sql").AsAzureSqlDatabase(); 1196var sql = builder.AddSqlServer("sql").AsAzureSqlDatabase(); 1279var usr = builder.AddParameter("usr"); 1280var pwd = builder.AddParameter("pwd", secret: true); 1283var postgres = builder.AddPostgres("postgres", usr, pwd).AsAzurePostgresFlexibleServer(); 1397var usr = builder.AddParameter("usr"); 1398var pwd = builder.AddParameter("pwd", secret: true); 1401var postgres = builder.AddPostgres("postgres", usr, pwd).AsAzurePostgresFlexibleServer(); 1506var usr = builder.AddParameter("usr"); 1507var pwd = builder.AddParameter("pwd", secret: true); 1510var postgres = builder.AddPostgres("postgres", usr, pwd).PublishAsAzurePostgresFlexibleServer(); 1543var postgres = builder.AddPostgres("postgres1") 1561var param = builder.AddParameter("param"); 1605var serviceBus = builder.AddAzureServiceBus("sb"); 1705var wps = builder.AddAzureWebPubSub("wps1"); 1772var wps = builder.AddAzureWebPubSub("wps1") 1840var storage = builder.AddAzureStorage("storage").RunAsEmulator(e => 1849var blob = storage.AddBlobs("blob"); 1850var queue = storage.AddQueues("queue"); 1851var table = storage.AddTables("table"); 1878var storagesku = builder.AddParameter("storagesku"); 1879var storage = builder.AddAzureStorage("storage") 1986var blob = storage.AddBlobs("blob"); 2001var queue = storage.AddQueues("queue"); 2016var table = storage.AddTables("table"); 2036var storagesku = builder.AddParameter("storagesku"); 2037var storage = builder.AddAzureStorage("storage") 2145var blob = storage.AddBlobs("blob"); 2160var queue = storage.AddQueues("queue"); 2175var table = storage.AddTables("table"); 2195var storagesku = builder.AddParameter("storagesku"); 2196var storage = builder.AddAzureStorage("storage") 2303var blob = storage.AddBlobs("blob"); 2318var queue = storage.AddQueues("queue"); 2333var table = storage.AddTables("table"); 2353var storagesku = builder.AddParameter("storagesku"); 2354var storage = builder.AddAzureStorage("storage") 2462var blob = storage.AddBlobs("blob"); 2477var queue = storage.AddQueues("queue"); 2492var table = storage.AddTables("table"); 2513var sku = builder.AddParameter("searchSku"); 2514var search = builder.AddAzureSearch("search") 2608var ai = builder.AddAzureApplicationInsights("ai").PublishAsConnectionString(); 2609var serviceBus = builder.AddAzureServiceBus("servicebus").PublishAsConnectionString(); 2611var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true) 2636var openai = builder.AddAzureOpenAI("openai") 2752var provisioningResource = builder.AddAzureInfrastructure("infrastructure", r => 2766var provisioningResource = builder.AddAzureInfrastructure("infrastructure", r =>
AzureContainerAppsTests.cs (11)
358var value = builder.AddParameter("value"); 359var minReplicas = builder.AddParameter("minReplicas"); 474var db = builder.AddAzureCosmosDB("mydb").AddDatabase("db"); 477var pgdb = builder.AddAzurePostgresFlexibleServer("pg").WithPasswordAuthentication().AddDatabase("db"); 480var blob = builder.AddAzureStorage("storage").AddBlobs("blobs"); 483var secretValue = builder.AddParameter("value0", "x", secret: true); 486var value = builder.AddParameter("value1", "y"); 488var project = builder.AddProject<Project>("api", launchProfileName: null) 856var customDomain = builder.AddParameter("customDomain"); 857var certificateName = builder.AddParameter("certificateName"); 1108var db = builder.AddAzureCosmosDB("mydb").AddDatabase("db");
AzureCosmosDBEmulatorFunctionalTests.cs (4)
35var resource = builder.AddAzureCosmosDB("resource") 39var dependentResource = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 84var cosmos = builder.AddAzureCosmosDB("cosmos"); 85var db = cosmos.AddDatabase(databaseName)
AzureEventHubsExtensionsTests.cs (9)
35var resource = builder.AddAzureEventHubs("resource") 40var dependentResource = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 70var eventHub = builder.AddAzureEventHubs("eventhubns") 103var eventHubs = builder.AddAzureEventHubs("eh").RunAsEmulator(configureContainer: builder => 120var eventHubs = builder.AddAzureEventHubs("eh").RunAsEmulator(configureContainer: builder => 137var eventHubs = builder.AddAzureEventHubs("eh").RunAsEmulator(configureContainer: builder => 154var eventHubs = builder.AddAzureEventHubs("eh").RunAsEmulator(configureContainer: builder => 174var eventHubs = builder.AddAzureEventHubs("eventhubs").RunAsEmulator(configureContainer: builder => 192var eventHubs = builder.AddAzureEventHubs("eventhubs");
AzureFunctionsTests.cs (1)
116var storage = builder.AddAzureStorage("my-own-storage").RunAsEmulator();
AzurePostgresExtensionsTests.cs (14)
20var postgres = builder.AddAzurePostgresFlexibleServer("postgres-data"); 138var userName = specifyUserName ? builder.AddParameter("user") : null; 139var password = specifyPassword ? builder.AddParameter("password") : null; 141var postgres = builder.AddAzurePostgresFlexibleServer("postgres-data") 259var postgres = builder.AddAzurePostgresFlexibleServer("postgres-data"); 261IResourceBuilder<AzurePostgresFlexibleServerDatabaseResource> db1 = null!; 262IResourceBuilder<AzurePostgresFlexibleServerDatabaseResource> db2 = null!; 299var usr = builder.AddParameter("usr", "user"); 300var pwd = builder.AddParameter("pwd", "p@ssw0rd1", secret: true); 302var postgres = builder.AddAzurePostgresFlexibleServer("postgres-data"); 319var db1 = postgres.AddDatabase("db1"); 320var db2 = postgres.AddDatabase("db2", "db2Name"); 336var postgres = builder.AddAzurePostgresFlexibleServer("postgres-data"); 337IResourceBuilder<AzurePostgresFlexibleServerDatabaseResource>? db = null;
AzureProvisioningResourceExtensionsTests.cs (2)
19var apiProject = builder.AddProject<Project>("api", launchProfileName: null) 25var resource1 = builder.AddAzureInfrastructure("resource1", infrastructure =>
AzureRedisExtensionsTests.cs (4)
18var redis = builder.AddAzureRedis("redis-cache"); 85var redis = builder.AddAzureRedis("redis-cache") 146var redis = builder.AddAzureRedis("cache") 164var cache = builder.AddAzureRedis("cache");
AzureResourceExtensionsTests.cs (8)
21var storage = builder.AddAzureStorage("storage").RunAsEmulator(configureContainer: builder => 47var storage = builder.AddAzureStorage("storage").RunAsEmulator(configureContainer: builder => 73var storage = builder.AddAzureStorage("storage").RunAsEmulator(configureContainer: builder => 99var storage = builder.AddAzureStorage("storage").RunAsEmulator(configureContainer: builder => 122var storage = builder.AddAzureStorage("storage").RunAsEmulator(configureContainer: builder => 144var cosmos = builder.AddAzureCosmosDB("cosmos"); 165var cosmos = builder.AddAzureCosmosDB("cosmos"); 186var cosmos = builder.AddAzureCosmosDB("cosmos");
AzureResourceOptionsTests.cs (2)
34var serviceBus = builder.AddAzureServiceBus("sb"); 37var sqlDatabase = builder.AddAzureSqlServer("sql-server")
AzureServiceBusExtensionsTests.cs (1)
16var serviceBus = builder.AddAzureServiceBus("sb");
AzureSqlExtensionsTests.cs (6)
20var sql = builder.AddAzureSqlServer("sql"); 140var sql = builder.AddAzureSqlServer("sql"); 142IResourceBuilder<AzureSqlDatabaseResource> db1 = null!; 143IResourceBuilder<AzureSqlDatabaseResource> db2 = null!; 184var sql = builder.AddAzureSqlServer("sql"); 185IResourceBuilder<AzureSqlDatabaseResource>? db = null;
AzureStorageEmulatorFunctionalTests.cs (6)
31var storage = builder.AddAzureStorage("resource") 35var blobs = storage.AddBlobs("blobs"); 36var queues = storage.AddQueues("queues"); 37var tables = storage.AddTables("tables"); 39var dependentResource = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 72var storage = builder.AddAzureStorage("storage").RunAsEmulator().AddBlobs("BlobConnection");
AzureWebPubSubExtensionsTests.cs (11)
20var wps = builder.AddAzureWebPubSub("wps1"); 30var wps = builder.AddAzureWebPubSub("wps1").ConfigureInfrastructure(infrastructure => 35var hub = wps.AddHub(hubName); 48var wps = builder.AddAzureWebPubSub("wps1"); 119var wps = builder.AddAzureWebPubSub("wps1").ConfigureInfrastructure(infrastructure => 196var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true).WithHttpsEndpoint(); 197var wps = builder.AddAzureWebPubSub("wps1"); 279var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true).WithHttpsEndpoint(); 280var wps = builder.AddAzureWebPubSub("wps1").ConfigureInfrastructure(infrastructure => 356var serviceA = builder.AddProject<ProjectA>("serviceA", o => o.ExcludeLaunchProfile = true).WithHttpsEndpoint(); 358var wps = builder.AddAzureWebPubSub("wps1").ConfigureInfrastructure(infrastructure =>
Aspire.Hosting.Azure.WebPubSub (9)
AzureWebPubSubExtensions.cs (9)
24/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 25public static IResourceBuilder<AzureWebPubSubResource> AddAzureWebPubSub(this IDistributedApplicationBuilder builder, [ResourceName] string name) 123public static IResourceBuilder<AzureWebPubSubHubResource> AddHub(this IResourceBuilder<AzureWebPubSubResource> builder, [ResourceName] string hubName) 131var hubBuilder = builder.ApplicationBuilder.CreateResourceBuilder(hubResource); 145public static IResourceBuilder<AzureWebPubSubHubResource> AddEventHandler(this IResourceBuilder<AzureWebPubSubHubResource> builder, 164public static IResourceBuilder<AzureWebPubSubHubResource> AddEventHandler(this IResourceBuilder<AzureWebPubSubHubResource> builder,
Aspire.Hosting.Containers.Tests (32)
ContainerResourceBuilderTests.cs (10)
16var redis = builder.AddContainer("redis", "redis").WithImage("redis-stack"); 24var redis = builder.AddContainer("redis", "redis").WithImage("redis-stack", "1.0.0"); 33var container = builder.AddContainer("app", "some-image"); 45var container = builder.AddContainer("app", "some-image"); 57var redis = builder.AddContainer("redis", "redis").WithImageTag("7.1"); 65var redis = builder.AddContainer("redis", "redis").WithImageRegistry("myregistry.azurecr.io"); 73var redis = builder.AddContainer("redis", "redis").WithImageSHA256("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd"); 81var container = builder.AddResource(new TestContainerResource("testcontainer")); 91var container = builder.AddResource(new TestContainerResource("testcontainer")); 101var container = builder.AddResource(new TestContainerResource("testcontainer"));
ContainerResourceTests.cs (2)
59var c1 = appBuilder.AddContainer("c1", "image2") 66var c2 = appBuilder.AddContainer("container", "none")
WithDockerfileTests.cs (20)
28var parameter = builder.AddParameter("secret", secret: true); 164var parameter = builder.AddParameter("message"); 167var container = builder.AddContainer("testcontainer", "testimage") 212var parameter = builder.AddParameter("message"); 215var container = builder.AddDockerfile("testcontainer", tempContextPath, tempDockerfilePath, "runner") 259var parameter = builder.AddParameter("secret", secret: true); 262var container = builder.AddContainer("testcontainer", "testimage") 305var parameter = builder.AddParameter("secret", secret: true); 308var container = builder.AddDockerfile("testcontainer", tempContextPath, tempDockerfilePath) 348var parameter = builder.AddParameter("message"); 419var parameter = builder.AddParameter("message"); 596var container = builder.AddContainer("mycontainer", "myimage"); 617var container = builder.AddContainer("mycontainer", "myimage") 633var container = builder.AddDockerfile("mycontainer", tempContextPath); 648var container = builder.AddContainer("mycontainer", "myimage") 664var container = builder.AddDockerfile("mycontainer", tempContextPath, "Dockerfile"); 679var container = builder.AddContainer("mycontainer", "myimage") 695var container = builder.AddDockerfile("mycontainer", tempContextPath, "Otherdockerfile"); 710var container = builder.AddContainer("mycontainer", "myimage") 726var container = builder.AddDockerfile("mycontainer", tempContextPath, tempDockerfilePath);
Aspire.Hosting.Dapr (20)
IDistributedApplicationBuilderExtensions.cs (6)
42/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 43public static IResourceBuilder<IDaprComponentResource> AddDaprComponent(this IDistributedApplicationBuilder builder, [ResourceName] string name, string type, DaprComponentOptions? options = null) 63/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 64public static IResourceBuilder<IDaprComponentResource> AddDaprPubSub(this IDistributedApplicationBuilder builder, [ResourceName] string name, DaprComponentOptions? options = null) 75/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 76public static IResourceBuilder<IDaprComponentResource> AddDaprStateStore(this IDistributedApplicationBuilder builder, [ResourceName] string name, DaprComponentOptions? options = null)
IDistributedApplicationComponentBuilderExtensions.cs (14)
10/// Extensions to <see cref="IResourceBuilder{T}"/> related to Dapr. 21public static IResourceBuilder<T> WithDaprSidecar<T>(this IResourceBuilder<T> builder, string appId) where T : IResource 33public static IResourceBuilder<T> WithDaprSidecar<T>(this IResourceBuilder<T> builder, DaprSidecarOptions? options = null) where T : IResource 52public static IResourceBuilder<T> WithDaprSidecar<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<IDaprSidecarResource>> configureSidecar) where T : IResource 57var sidecarBuilder = builder.ApplicationBuilder.AddResource(new DaprSidecarResource($"{builder.Resource.Name}-dapr")) 76public static IResourceBuilder<IDaprSidecarResource> WithOptions(this IResourceBuilder<IDaprSidecarResource> builder, DaprSidecarOptions options) 87public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<IDaprComponentResource> component) where TDestination : IResource
Aspire.Hosting.Dapr.Tests (3)
DaprSchemaTests.cs (2)
21var state = dapr.AddDaprStateStore("daprstate"); 22var pubsub = dapr.AddDaprPubSub("daprpubsub");
DaprTests.cs (1)
108var containerResource = builder.AddContainer("name", "image")
Aspire.Hosting.Elasticsearch (9)
ElasticsearchBuilderExtensions.cs (9)
32/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 45public static IResourceBuilder<ElasticsearchResource> AddElasticsearch( 48IResourceBuilder<ParameterResource>? password = null, 101/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 116public static IResourceBuilder<ElasticsearchResource> WithDataVolume(this IResourceBuilder<ElasticsearchResource> builder, string? name = null) 128/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 143public static IResourceBuilder<ElasticsearchResource> WithDataBindMount(this IResourceBuilder<ElasticsearchResource> builder, string source)
Aspire.Hosting.Elasticsearch.Tests (14)
AddElasticsearchTests.cs (4)
81var pass = appBuilder.AddParameter("pass"); 141var elasticsearch = appBuilder 161var elasticsearch = appBuilder.AddElasticsearch("elasticsearch"); 199var elasticsearch = appBuilder.AddElasticsearch("elasticsearch")
ElasticsearchFunctionalTests.cs (6)
39var elasticsearch = builder.AddElasticsearch("elasticsearch"); 83var elasticsearch1 = builder1.AddElasticsearch("elasticsearch"); 134var passwordParameter2 = builder2.AddParameter("pwd"); 136var elasticsearch2 = builder2.AddElasticsearch("elasticsearch", passwordParameter2); 219var resource = builder.AddElasticsearch("resource") 222var dependentResource = builder.AddElasticsearch("dependentresource")
ElasticsearchPublicApiTests.cs (4)
40IResourceBuilder<ElasticsearchResource> builder = null!; 42Func<IResourceBuilder<ElasticsearchResource>>? action = null; 63var resourceBuilder = builder.AddElasticsearch("Elasticsearch"); 78var password = builder.AddParameter("Password");
Aspire.Hosting.Garnet (20)
GarnetBuilderExtensions.cs (20)
54/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 55public static IResourceBuilder<GarnetResource> AddGarnet(this IDistributedApplicationBuilder builder, [ResourceName] string name, 89/// Use <see cref="WithPersistence(IResourceBuilder{GarnetResource}, TimeSpan?)"/> to adjust Garnet persistence configuration, e.g.: 102/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 103public static IResourceBuilder<GarnetResource> WithDataVolume(this IResourceBuilder<GarnetResource> builder, 122/// Use <see cref="WithPersistence(IResourceBuilder{GarnetResource}, TimeSpan?)"/> to adjust Garnet persistence configuration, e.g.: 135/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 136public static IResourceBuilder<GarnetResource> WithDataBindMount(this IResourceBuilder<GarnetResource> builder, 155/// Use with <see cref="WithDataBindMount(IResourceBuilder{GarnetResource}, string, bool)"/> 156/// or <see cref="WithDataVolume(IResourceBuilder{GarnetResource}, string?, bool)"/> to persist Garnet data across sessions with custom persistence configuration, e.g.: 166/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 168public static IResourceBuilder<GarnetResource> WithPersistence(this IResourceBuilder<GarnetResource> builder, 176/// Use with <see cref="WithDataBindMount(IResourceBuilder{GarnetResource}, string, bool)"/> 177/// or <see cref="WithDataVolume(IResourceBuilder{GarnetResource}, string?, bool)"/> to persist Garnet data across sessions with custom persistence configuration, e.g.: 186/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 187public static IResourceBuilder<GarnetResource> WithPersistence(this IResourceBuilder<GarnetResource> builder,
Aspire.Hosting.Garnet.Tests (18)
AddGarnetTests.cs (9)
91var garnet = builder.AddGarnet("myGarnet"); 120var garnet = builder.AddGarnet("myGarnet"); 145var garnet = builder.AddGarnet("myGarnet"); 167var garnet = builder.AddGarnet("myGarnet") 186var garnet = builder.AddGarnet("myGarnet") 198var garnet = builder.AddGarnet("myGarnet") 217var garnet = builder.AddGarnet("myGarnet") 229var garnet = builder.AddGarnet("myGarnet") 249var garnet = builder.AddGarnet("myGarnet")
GarnetFunctionalTests.cs (5)
32var resource = builder.AddGarnet("resource") 35var dependentResource = builder.AddGarnet("dependentresource") 70var garnet = builder.AddGarnet("garnet"); 117var garnet1 = builder1.AddGarnet("garnet"); 190var garnet2 = builder2.AddGarnet("garnet");
GarnetPublicApiTests.cs (4)
50IResourceBuilder<GarnetResource> builder = null!; 63var garnet = builder.AddGarnet("Garnet"); 75IResourceBuilder<GarnetResource> builder = null!; 86IResourceBuilder<GarnetResource> builder = null!;
Aspire.Hosting.Kafka (16)
KafkaBuilderExtensions.cs (16)
32/// <returns>A reference to the <see cref="IResourceBuilder{KafkaServerResource}"/>.</returns> 33public static IResourceBuilder<KafkaServerResource> AddKafka(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port = null) 91/// <returns>A reference to the <see cref="IResourceBuilder{KafkaServerResource}"/>.</returns> 92public static IResourceBuilder<KafkaServerResource> WithKafkaUI(this IResourceBuilder<KafkaServerResource> builder, Action<IResourceBuilder<KafkaUIContainerResource>>? configureContainer = null, string? containerName = null) 98var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingKafkaUIResource); 107var kafkaUiBuilder = builder.ApplicationBuilder.AddResource(kafkaUi) 158public static IResourceBuilder<KafkaUIContainerResource> WithHostPort(this IResourceBuilder<KafkaUIContainerResource> builder, int? port) 174/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 175public static IResourceBuilder<KafkaServerResource> WithDataVolume(this IResourceBuilder<KafkaServerResource> builder, string? name = null, bool isReadOnly = false) 190/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 191public static IResourceBuilder<KafkaServerResource> WithDataBindMount(this IResourceBuilder<KafkaServerResource> builder, string source, bool isReadOnly = false)
Aspire.Hosting.Kafka.Tests (14)
AddKafkaTests.cs (4)
79var kafka = appBuilder.AddKafka("kafka"); 117var kafka = appBuilder.AddKafka("kafka") 135var kafka = appBuilder.AddKafka("kafka") 165Action<IResourceBuilder<KafkaUIContainerResource>> kafkaUIConfigurationCallback = kafkaUi =>
KafkaFunctionalTests.cs (5)
33var resource = builder.AddKafka("resource") 36var dependentResource = builder.AddKafka("dependentresource") 68var kafka = builder.AddKafka("kafka"); 128var kafka1 = builder1.AddKafka("kafka"); 201var kafka2 = builder2.AddKafka("kafka");
KafkaPublicApiTests.cs (5)
39IResourceBuilder<KafkaServerResource> builder = null!; 50IResourceBuilder<KafkaServerResource> builder = null!; 63var Kafka = builderResource.AddKafka("Kafka"); 75IResourceBuilder<KafkaServerResource> builder = null!; 86IResourceBuilder<KafkaUIContainerResource> builder = null!;
Aspire.Hosting.Keycloak (13)
KeycloakResourceBuilderExtensions.cs (13)
28/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 42public static IResourceBuilder<KeycloakResource> AddKeycloak( 46IResourceBuilder<ParameterResource>? adminUsername = null, 47IResourceBuilder<ParameterResource>? adminPassword = null) 87/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 98public static IResourceBuilder<KeycloakResource> WithDataVolume(this IResourceBuilder<KeycloakResource> builder, string? name = null) 111/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 122public static IResourceBuilder<KeycloakResource> WithDataBindMount(this IResourceBuilder<KeycloakResource> builder, string source) 136/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 147public static IResourceBuilder<KeycloakResource> WithRealmImport( 148this IResourceBuilder<KeycloakResource> builder,
Aspire.Hosting.Keycloak.Tests (13)
KeycloakPublicApiTests.cs (7)
17var adminPassword = builder.AddParameter("Password"); 64IResourceBuilder<KeycloakResource> builder = null!; 75IResourceBuilder<KeycloakResource> builder = null!; 88var keycloak = builder.AddKeycloak("Keycloak"); 100IResourceBuilder<KeycloakResource> builder = null!; 113var keycloak = builder.AddKeycloak("Keycloak"); 126var keycloak = builder.AddKeycloak("Keycloak");
KeycloakResourceBuilderTests.cs (6)
50var keycloak = builder.AddKeycloak(resourceName) 65var keycloak = builder.AddKeycloak("keycloak") 88var keycloak = builder.AddKeycloak(resourceName); 112var rmq = appBuilder.AddKeycloak("keycloak"); 122var rmq = appBuilder.AddKeycloak("keycloak"); 131var keycloak = builder.AddKeycloak("keycloak");
Aspire.Hosting.Milvus (20)
MilvusBuilderExtensions.cs (20)
41/// <returns>A reference to the <see cref="IResourceBuilder{MilvusServerResource}"/>.</returns> 42public static IResourceBuilder<MilvusServerResource> AddMilvus(this IDistributedApplicationBuilder builder, 44IResourceBuilder<ParameterResource>? apiKey = null, 93/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 94public static IResourceBuilder<MilvusDatabaseResource> AddDatabase(this IResourceBuilder<MilvusServerResource> builder, [ResourceName] string name, string? databaseName = null) 129/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 130public static IResourceBuilder<T> WithAttu<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<AttuResource>>? configureContainer = null, string? containerName = null) where T : MilvusServerResource 137var resourceBuilder = builder.ApplicationBuilder.AddResource(attuContainer) 155/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 156public static IResourceBuilder<MilvusServerResource> WithDataVolume(this IResourceBuilder<MilvusServerResource> builder, string? name = null, bool isReadOnly = false) 168/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 169public static IResourceBuilder<MilvusServerResource> WithDataBindMount(this IResourceBuilder<MilvusServerResource> builder, string source, bool isReadOnly = false) 181/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 182public static IResourceBuilder<MilvusServerResource> WithConfigurationBindMount(this IResourceBuilder<MilvusServerResource> builder, string configurationFilePath)
Aspire.Hosting.Milvus.Tests (33)
AddMilvusTests.cs (13)
22var pass = appBuilder.AddParameter("apikey"); 53var pass = appBuilder.AddParameter("apikey"); 84var pass = appBuilder.AddParameter("apikey"); 86var milvus = appBuilder.AddMilvus("my-milvus", pass) 101var pass = appBuilder.AddParameter("apikey"); 103var milvus = appBuilder.AddMilvus("my-milvus", pass) 106var projectA = appBuilder.AddProject<ProjectA>("projecta", o => o.ExcludeLaunchProfile = true) 117var container1 = appBuilder.AddContainer("container1", "fake") 134var pass = appBuilder.AddParameter("apikey"); 135var milvus = appBuilder.AddMilvus("milvus", pass); 136var db1 = milvus.AddDatabase("db1"); 185var pass = builder.AddParameter("apikey"); 187var milvus = builder.AddMilvus("my-milvus", grpcPort: 5503, apiKey: pass);
MilvusFunctionalTests.cs (7)
25var milvus = builder.AddMilvus("milvus"); 26var db = milvus.AddDatabase("milvusdb", "db1"); 80var milvus1 = builder1.AddMilvus("milvus1"); 83var db1 = milvus1.AddDatabase("milvusdb1", dbname); 133var passwordParameter = builder2.AddParameter("pwd"); 136var milvus2 = builder2.AddMilvus("milvus2", passwordParameter); 137var db2 = milvus2.AddDatabase("milvusdb2", dbname);
MilvusPublicApiTests.cs (13)
17IResourceBuilder<ParameterResource> apiKey = null!; 29var apiKey = builder.AddParameter("ApiKey"); 43var apiKey = builder.AddParameter("ApiKey"); 45var milvus = builder.AddMilvus("Milvus", apiKey); 57IResourceBuilder<MilvusServerResource> builder = null!; 69IResourceBuilder<MilvusServerResource> builder = null!; 80IResourceBuilder<MilvusServerResource> builder = null!; 91IResourceBuilder<MilvusServerResource> builder = null!; 105var apiKey = builder.AddParameter("ApiKey"); 107var milvus = builder.AddMilvus("Milvus", apiKey); 119IResourceBuilder<MilvusServerResource> builder = null!; 132var apiKey = builder.AddParameter("ApiKey"); 134var milvus = builder.AddMilvus("Milvus", apiKey);
Aspire.Hosting.MongoDB (25)
MongoDBBuilderExtensions.cs (25)
33/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 34public static IResourceBuilder<MongoDBServerResource> AddMongoDB(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port) 47/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 48public static IResourceBuilder<MongoDBServerResource> AddMongoDB(this IDistributedApplicationBuilder builder, 51IResourceBuilder<ParameterResource>? userName = null, 52IResourceBuilder<ParameterResource>? password = null) 95/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 96public static IResourceBuilder<MongoDBDatabaseResource> AddDatabase(this IResourceBuilder<MongoDBServerResource> builder, [ResourceName] string name, string? databaseName = null) 135/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 136public static IResourceBuilder<T> WithMongoExpress<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<MongoExpressContainerResource>>? configureContainer = null, string? containerName = null) where T : MongoDBServerResource 143var resourceBuilder = builder.ApplicationBuilder.AddResource(mongoExpressContainer) 161public static IResourceBuilder<MongoExpressContainerResource> WithHostPort(this IResourceBuilder<MongoExpressContainerResource> builder, int? port) 177/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 178public static IResourceBuilder<MongoDBServerResource> WithDataVolume(this IResourceBuilder<MongoDBServerResource> builder, string? name = null, bool isReadOnly = false) 191/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 192public static IResourceBuilder<MongoDBServerResource> WithDataBindMount(this IResourceBuilder<MongoDBServerResource> builder, string source, bool isReadOnly = false) 206/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 207public static IResourceBuilder<MongoDBServerResource> WithInitBindMount(this IResourceBuilder<MongoDBServerResource> builder, string source, bool isReadOnly = true)
Aspire.Hosting.MongoDB.Tests (29)
AddMongoDBTests.cs (9)
193var mongo = appBuilder.AddMongoDB("mongo"); 194var db = mongo.AddDatabase("mydb"); 234var db = builder.AddMongoDB("mongo1"); 248var db = builder.AddMongoDB("mongo2"); 257var mongo1 = builder.AddMongoDB("mongo1"); 259var db1 = mongo1.AddDatabase("db1", "customers1"); 260var db2 = mongo1.AddDatabase("db2", "customers2"); 274var db1 = builder.AddMongoDB("mongo1") 277var db2 = builder.AddMongoDB("mongo2")
MongoDbFunctionalTests.cs (11)
44var resource = builder.AddMongoDB("resource") 47var dependentResource = builder.AddMongoDB("dependentresource") 81var mongodb = builder.AddMongoDB("mongodb"); 82var db = mongodb.AddDatabase("testdb"); 123var mongodb1 = builder1.AddMongoDB("mongodb"); 125var db1 = mongodb1.AddDatabase(dbName); 172var passwordParameter2 = builder2.AddParameter("pwd"); 175var mongodb2 = builder2.AddMongoDB("mongodb", password: passwordParameter2); 176var db2 = mongodb2.AddDatabase(dbName); 307var mongodb = builder.AddMongoDB("mongodb") 310var db = mongodb.AddDatabase(dbName);
MongoDBPublicApiTests.cs (9)
39IResourceBuilder<MongoDBServerResource> builder = null!; 52var MongoDB = builderResource.AddMongoDB("MongoDB"); 64IResourceBuilder<MongoDBServerResource> builder = null!; 75IResourceBuilder<MongoDBServerResource> builder = null!; 88var MongoDB = builderResource.AddMongoDB("MongoDB"); 100IResourceBuilder<MongoDBServerResource> builder = null!; 111IResourceBuilder<MongoDBServerResource> builder = null!; 123var MongoDB = builderResource.AddMongoDB("MongoDB"); 135IResourceBuilder<MongoExpressContainerResource> builder = null!;
Aspire.Hosting.MySql (22)
MySqlBuilderExtensions.cs (22)
28/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 29public static IResourceBuilder<MySqlServerResource> AddMySql(this IDistributedApplicationBuilder builder, [ResourceName] string name, IResourceBuilder<ParameterResource>? password = null, int? port = null) 70/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 71public static IResourceBuilder<MySqlDatabaseResource> AddDatabase(this IResourceBuilder<MySqlServerResource> builder, [ResourceName] string name, string? databaseName = null) 93/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 94public static IResourceBuilder<T> WithPhpMyAdmin<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<PhpMyAdminContainerResource>>? configureContainer = null, string? containerName = null) where T : MySqlServerResource 108var phpMyAdminContainerBuilder = builder.ApplicationBuilder.AddResource(phpMyAdminContainer) 185public static IResourceBuilder<PhpMyAdminContainerResource> WithHostPort(this IResourceBuilder<PhpMyAdminContainerResource> builder, int? port) 201/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 202public static IResourceBuilder<MySqlServerResource> WithDataVolume(this IResourceBuilder<MySqlServerResource> builder, string? name = null, bool isReadOnly = false) 215/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 216public static IResourceBuilder<MySqlServerResource> WithDataBindMount(this IResourceBuilder<MySqlServerResource> builder, string source, bool isReadOnly = false) 230/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 231public static IResourceBuilder<MySqlServerResource> WithInitBindMount(this IResourceBuilder<MySqlServerResource> builder, string source, bool isReadOnly = true)
Aspire.Hosting.MySql.Tests (39)
AddMySqlTests.cs (17)
21var mysql = appBuilder.AddMySql("mysql"); 31var mysql = appBuilder.AddMySql("mysql"); 79var pass = appBuilder.AddParameter("pass"); 158var mysql = appBuilder.AddMySql("mysql"); 159var db = mysql.AddDatabase("db"); 197var pass = appBuilder.AddParameter("pass"); 199var mysql = appBuilder.AddMySql("mysql", pass); 237var mysql = builder.AddMySql("mySql").WithPhpMyAdmin(); 271var mysql1 = builder.AddMySql("mysql1").WithPhpMyAdmin(c => c.WithHostPort(8081)); 272var mysql2 = builder.AddMySql("mysql2").WithPhpMyAdmin(c => c.WithHostPort(8081)); 303var db = builder.AddMySql("mysql1"); 317var db = builder.AddMySql("mysql2"); 326var mysql1 = builder.AddMySql("mysql1"); 328var db1 = mysql1.AddDatabase("db1", "customers1"); 329var db2 = mysql1.AddDatabase("db2", "customers2"); 346var db1 = builder.AddMySql("mysql1") 349var db2 = builder.AddMySql("mysql2")
MySqlFunctionalTests.cs (13)
40var resource = builder.AddMySql("resource") 43var dependentResource = builder.AddMySql("dependentresource") 80var mysql = builder.AddMySql("mysql").WithEnvironment("MYSQL_DATABASE", mySqlDbName); 81var db = mysql.AddDatabase(mySqlDbName); 134var mysql1 = builder1.AddMySql("mysql").WithEnvironment("MYSQL_DATABASE", mySqlDbName); 137var db1 = mysql1.AddDatabase(mySqlDbName); 209var passwordParameter2 = builder2.AddParameter("pwd"); 212var mysql2 = builder2.AddMySql("mysql", passwordParameter2); 213var db2 = mysql2.AddDatabase(mySqlDbName); 327var mysql = builder.AddMySql("mysql").WithEnvironment("MYSQL_DATABASE", mySqlDbName); 328var db = mysql.AddDatabase(mySqlDbName); 399var mysql = builder.AddMySql("mysql").WithEnvironment("MYSQL_DATABASE", mySqlDbName); 400var db = mysql.AddDatabase(mySqlDbName);
MySqlPublicApiTests.cs (9)
39IResourceBuilder<MySqlServerResource> builder = null!; 50IResourceBuilder<MySqlServerResource> builder = null!; 63var mySql = builder.AddMySql("MySql"); 75IResourceBuilder<MySqlServerResource> builder = null!; 88var mySql = builder.AddMySql("MySql"); 100IResourceBuilder<MySqlServerResource> builder = null!; 113var mySql = builder.AddMySql("MySql"); 125IResourceBuilder<MySqlServerResource> builder = null!; 135IResourceBuilder<PhpMyAdminContainerResource> builder = null!;
Aspire.Hosting.Nats (18)
NatsBuilderExtensions.cs (18)
30/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 31public static IResourceBuilder<NatsServerResource> AddNats(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port) 44/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 45public static IResourceBuilder<NatsServerResource> AddNats(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port = null, 46IResourceBuilder<ParameterResource>? userName = null, 47IResourceBuilder<ParameterResource>? password = null) 109/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 111public static IResourceBuilder<NatsServerResource> WithJetStream(this IResourceBuilder<NatsServerResource> builder, string? srcMountPath = null) 128/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 129public static IResourceBuilder<NatsServerResource> WithJetStream(this IResourceBuilder<NatsServerResource> builder) 142/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 143public static IResourceBuilder<NatsServerResource> WithDataVolume(this IResourceBuilder<NatsServerResource> builder, string? name = null, bool isReadOnly = false) 158/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 159public static IResourceBuilder<NatsServerResource> WithDataBindMount(this IResourceBuilder<NatsServerResource> builder, string source, bool isReadOnly = false)
Aspire.Hosting.Nats.Tests (29)
AddNatsTests.cs (12)
20var nats = appBuilder.AddNats("nats"); 29var nats = appBuilder.AddNats("nats"); 39var nats = appBuilder.AddNats("nats") 62var userParameters = appBuilder.AddParameter("user", "usr"); 63var passwordParameters = appBuilder.AddParameter("pass", "password"); 65var nats = appBuilder.AddNats("nats", userName: userParameters, password: passwordParameters) 129var user = appBuilder.AddParameter("user", "usr"); 130var pass = appBuilder.AddParameter("pass", "pass"); 186var nats = builder.AddNats("nats"); 219var userNameParameter = builder.AddParameter("user"); 220var passwordParameter = builder.AddParameter("pass"); 222var nats = builder.AddNats("nats", userName: userNameParameter, password: passwordParameter)
NatsFunctionalTests.cs (11)
30var nats = builder.AddNats("nats") 73var usernameParameter = user is null ? null : builder.AddParameter("user", user); 74var passwordParameter = password is null ? null : builder.AddParameter("pass", password); 76var nats = builder.AddNats("nats", userName: usernameParameter, password: passwordParameter); 117var usernameParameter = builder.AddParameter("user"); 118var passwordParameter = builder.AddParameter("pass"); 120var nats = builder.AddNats("nats", userName: usernameParameter, password: passwordParameter); 165var nats1 = builder1.AddNats("nats") 219var nats2 = builder2.AddNats("nats") 335var resource = builder.AddNats("resource") 338var dependentResource = builder.AddNats("dependentresource")
NatsPublicApiTests.cs (6)
43IResourceBuilder<NatsServerResource> builder = null!; 54IResourceBuilder<NatsServerResource> builder = null!; 65IResourceBuilder<NatsServerResource> builder = null!; 78var nats = builder.AddNats("Nats"); 103var user = builder.AddParameter("user"); 104var password = builder.AddParameter("password");
Aspire.Hosting.NodeJs (6)
NodeExtensions.cs (6)
22/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 23public static IResourceBuilder<NodeAppResource> AddNodeApp(this IDistributedApplicationBuilder builder, [ResourceName] string name, string scriptPath, string? workingDirectory = null, string[]? args = null) 49/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 50public static IResourceBuilder<NodeAppResource> AddNpmApp(this IDistributedApplicationBuilder builder, [ResourceName] string name, string workingDirectory, string scriptName = "start", string[]? args = null) 70private static IResourceBuilder<NodeAppResource> WithNodeDefaults(this IResourceBuilder<NodeAppResource> builder) =>
Aspire.Hosting.NodeJs.Tests (4)
AddNodeAppTests.cs (2)
17var nodeApp = builder.AddNodeApp("nodeapp", "..\\foo\\app.js", workingDirectory) 46var npmApp = builder.AddNpmApp("npmapp", workingDirectory)
NodeAppFixture.cs (2)
25public IResourceBuilder<NodeAppResource>? NodeAppBuilder { get; private set; } 26public IResourceBuilder<NodeAppResource>? NpmAppBuilder { get; private set; }
Aspire.Hosting.Oracle (18)
OracleDatabaseBuilderExtensions.cs (18)
27/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 28public static IResourceBuilder<OracleDatabaseServerResource> AddOracle(this IDistributedApplicationBuilder builder, [ResourceName] string name, IResourceBuilder<ParameterResource>? password = null, int? port = null) 67/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 68public static IResourceBuilder<OracleDatabaseResource> AddDatabase(this IResourceBuilder<OracleDatabaseServerResource> builder, [ResourceName] string name, string? databaseName = null) 83/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 84public static IResourceBuilder<OracleDatabaseServerResource> WithDataVolume(this IResourceBuilder<OracleDatabaseServerResource> builder, string? name = null) 92/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 93public static IResourceBuilder<OracleDatabaseServerResource> WithDataBindMount(this IResourceBuilder<OracleDatabaseServerResource> builder, string source) 101/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 102public static IResourceBuilder<OracleDatabaseServerResource> WithInitBindMount(this IResourceBuilder<OracleDatabaseServerResource> builder, string source) 110/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 111public static IResourceBuilder<OracleDatabaseServerResource> WithDbSetupBindMount(this IResourceBuilder<OracleDatabaseServerResource> builder, string source)
Aspire.Hosting.Oracle.Tests (26)
AddOracleTests.cs (15)
20var orcl = appBuilder.AddOracle("orcl"); 30var orcl = appBuilder.AddOracle("orcl"); 78var pass = appBuilder.AddParameter("pass"); 160var pass = appBuilder.AddParameter("pass"); 199var oracleServer = builder.AddOracle("oracle"); 200var db = oracleServer.AddDatabase("db"); 238var pass = builder.AddParameter("pass"); 240var oracleServer = builder.AddOracle("oracle", pass); 269var db = builder.AddOracle("oracle1"); 283var db = builder.AddOracle("oracle2"); 292var oracle1 = builder.AddOracle("oracle1"); 294var db1 = oracle1.AddDatabase("db1", "customers1"); 295var db2 = oracle1.AddDatabase("db2", "customers2"); 309var db1 = builder.AddOracle("oracle1") 312var db2 = builder.AddOracle("oracle2")
OracleFunctionalTests.cs (11)
40var oracle = builder.AddOracle("oracle"); 42var db = oracle.AddDatabase(oracleDbName); 97var oracle1 = builder1.AddOracle("oracle"); 101var db1 = oracle1.AddDatabase(oracleDbName); 170var passwordParameter2 = builder2.AddParameter("pwd"); 173var oracle2 = builder2.AddOracle("oracle", passwordParameter2); 175var db2 = oracle2.AddDatabase(oracleDbName); 288var oracle = builder.AddOracle("oracle"); 289var db = oracle.AddDatabase(oracleDbName); 363var resource = builder.AddOracle("resource") 366var dependentResource = builder.AddOracle("dependentresource")
Aspire.Hosting.Orleans (20)
IProviderConfiguration.cs (1)
19void ConfigureResource<T>(IResourceBuilder<T> resourceBuilder, string configSectionPath) where T : IResourceWithEnvironment;
OrleansServiceClientExtensions.cs (2)
21public static IResourceBuilder<T> WithReference<T>( 22this IResourceBuilder<T> builder,
OrleansServiceExtensions.cs (14)
53IResourceBuilder<ParameterResource> clusterId) 81IResourceBuilder<ParameterResource> serviceId) 95IResourceBuilder<IResourceWithConnectionString> provider) 130IResourceBuilder<IResourceWithConnectionString> provider) 143IResourceBuilder<IResourceWithConnectionString> provider) 182IResourceBuilder<IResourceWithConnectionString> provider) 195IResourceBuilder<IResourceWithConnectionString> provider) 260IResourceBuilder<IResourceWithConnectionString> provider) 298IResourceBuilder<IResourceWithConnectionString> provider) 311IResourceBuilder<IResourceWithConnectionString> provider) 347public static IResourceBuilder<T> WithReference<T>( 348this IResourceBuilder<T> builder, 355internal static IResourceBuilder<T> WithOrleansReference<T>( 356this IResourceBuilder<T> builder,
ProviderConfiguration.cs (3)
11internal sealed class ProviderConfiguration(string providerType, string? serviceKey = null, IResourceBuilder<IResourceWithConnectionString>? resource = null) : IProviderConfiguration 18internal static ProviderConfiguration Create(IResourceBuilder<IResourceWithConnectionString> resourceBuilder) 36public void ConfigureResource<T>(IResourceBuilder<T> resourceBuilder, string configurationSectionName) where T : IResourceWithEnvironment
Aspire.Hosting.PostgreSQL (39)
PostgresBuilderExtensions.cs (39)
30/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 34/// using the <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> 40public static IResourceBuilder<PostgresServerResource> AddPostgres(this IDistributedApplicationBuilder builder, 42IResourceBuilder<ParameterResource>? userName = null, 43IResourceBuilder<ParameterResource>? password = null, 97/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 101/// using the <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> 105/// Note that by default calling <see cref="AddDatabase(IResourceBuilder{PostgresServerResource}, string, string?)"/> 107/// will create the database. As a result if <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> 111public static IResourceBuilder<PostgresDatabaseResource> AddDatabase(this IResourceBuilder<PostgresServerResource> builder, [ResourceName] string name, string? databaseName = null) 133/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 134public static IResourceBuilder<T> WithPgAdmin<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<PgAdminContainerResource>>? configureContainer = null, string? containerName = null) where T : PostgresServerResource 140var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingPgAdminResource); 149var pgAdminContainerBuilder = builder.ApplicationBuilder.AddResource(pgAdminContainer) 221public static IResourceBuilder<PgAdminContainerResource> WithHostPort(this IResourceBuilder<PgAdminContainerResource> builder, int? port) 237public static IResourceBuilder<PgWebContainerResource> WithHostPort(this IResourceBuilder<PgWebContainerResource> builder, int? port) 269/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 270public static IResourceBuilder<PostgresServerResource> WithPgWeb(this IResourceBuilder<PostgresServerResource> builder, Action<IResourceBuilder<PgWebContainerResource>>? configureContainer = null, string? containerName = null) 274var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingPgWebResource); 283var pgwebContainerBuilder = builder.ApplicationBuilder.AddResource(pgwebContainer) 358/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 359public static IResourceBuilder<PostgresServerResource> WithDataVolume(this IResourceBuilder<PostgresServerResource> builder, string? name = null, bool isReadOnly = false) 373/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 374public static IResourceBuilder<PostgresServerResource> WithDataBindMount(this IResourceBuilder<PostgresServerResource> builder, string source, bool isReadOnly = false) 388/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 389public static IResourceBuilder<PostgresServerResource> WithInitBindMount(this IResourceBuilder<PostgresServerResource> builder, string source, bool isReadOnly = true)
Aspire.Hosting.PostgreSQL.Tests (54)
AddPostgresTests.cs (25)
21var redis = builder.AddPostgres("postgres"); 30var pg = appBuilder.AddPostgres("pg"); 40var pg = appBuilder.AddPostgres("pg"); 103var pass = appBuilder.AddParameter("pass"); 156var postgres = appBuilder.AddPostgres("postgres") 194var pass = appBuilder.AddParameter("pass"); 248var pgServer = builder.AddPostgres("pg"); 249var db = pgServer.AddDatabase("db"); 291var userNameParameter = builder.AddParameter("user"); 292var passwordParameter = builder.AddParameter("pass"); 294var pgServer = builder.AddPostgres("pg", userNameParameter, passwordParameter); 455var username = builder.AddParameter("pg-user", "myuser"); 456var pg1 = builder.AddPostgres("mypostgres1").WithPgAdmin(pga => pga.WithHostPort(8081)); 457var pg2 = builder.AddPostgres("mypostgres2", username).WithPgAdmin(pga => pga.WithHostPort(8081)); 500var pg1 = builder.AddPostgres("mypostgres1").WithPgWeb(pga => pga.WithHostPort(8081)); 501var pg2 = builder.AddPostgres("mypostgres2").WithPgWeb(pga => pga.WithHostPort(8081)); 507var db1 = pg1.AddDatabase("db1"); 508var db2 = pg2.AddDatabase("db2"); 554var db = builder.AddPostgres("postgres1"); 568var db = builder.AddPostgres("postgres2"); 577var postgres1 = builder.AddPostgres("postgres1"); 579var db1 = postgres1.AddDatabase("db1", "customers1"); 580var db2 = postgres1.AddDatabase("db2", "customers2"); 594var db1 = builder.AddPostgres("postgres1") 597var db2 = builder.AddPostgres("postgres2")
PostgrePublicApiTests.cs (12)
16IResourceBuilder<PostgresServerResource> builder = null!; 29var postgres = builder.AddPostgres("Postgres"); 79var parameterResource = builder.AddParameter("password"); 94var parameterResource = builder.AddParameter("password"); 121var password = builder.AddParameter("password"); 144IResourceBuilder<PostgresServerResource> builder = null!; 157var postgres = builder.AddPostgres("Postgres"); 169IResourceBuilder<PostgresServerResource> builder = null!; 180IResourceBuilder<PgAdminContainerResource> builder = null!; 191IResourceBuilder<PostgresServerResource> builder = null!; 204var postgres = builder.AddPostgres("Postgres"); 216IResourceBuilder<PostgresServerResource> builder = null!;
PostgresFunctionalTests.cs (17)
43var postgres = builder.AddPostgres("postgres") 46var dependentResource = builder.AddPostgres("dependentresource") 82IResourceBuilder<PgAdminContainerResource>? adminBuilder = null; 83var redis = builder.AddPostgres("postgres").WithPgAdmin(c => adminBuilder = c); 112var postgres = builder.AddPostgres("pg").WithEnvironment("POSTGRES_DB", postgresDbName); 113var db = postgres.AddDatabase(postgresDbName); 151IResourceBuilder<PgWebContainerResource>? pgWebBuilder = null; 153var pg = builder.AddPostgres("pg1"); 154var db = pg.AddDatabase(dbName); 206var usernameParameter = builder1.AddParameter("user"); 207var passwordParameter = builder1.AddParameter("pwd"); 210var postgres1 = builder1.AddPostgres("pg", usernameParameter, passwordParameter).WithEnvironment("POSTGRES_DB", postgresDbName); 212var db1 = postgres1.AddDatabase(postgresDbName); 279var postgres2 = builder2.AddPostgres("pg", usernameParameter, passwordParameter); 280var db2 = postgres2.AddDatabase(postgresDbName); 379var postgres = builder.AddPostgres("pg").WithEnvironment("POSTGRES_DB", postgresDbName); 380var db = postgres.AddDatabase(postgresDbName);
Aspire.Hosting.Python (10)
PythonAppResourceBuilderExtensions.cs (5)
23/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 60public static IResourceBuilder<PythonAppResource> AddPythonApp( 77/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 109public static IResourceBuilder<PythonAppResource> AddPythonApp( 131var resourceBuilder = builder.AddResource(projectResource).WithArgs(context =>
PythonProjectResourceBuilderExtensions.cs (5)
24/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 62public static IResourceBuilder<PythonProjectResource> AddPythonProject( 79/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 112public static IResourceBuilder<PythonProjectResource> AddPythonProject( 134var resourceBuilder = builder.AddResource(projectResource).WithArgs(context =>
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (4)
32var pyproj = builder.AddPythonApp("pyproj", projectDirectory, scriptName); 62var pyproj = builder.AddPythonApp("pyproj", projectDirectory, scriptName); 115var externalResource = builder.AddConnectionString("connectionString"); 118var pyproj = builder.AddPythonApp("pyproj", projectDirectory, scriptName)
Aspire.Hosting.Qdrant (13)
QdrantBuilderExtensions.cs (13)
37/// <returns>A reference to the <see cref="IResourceBuilder{QdrantServerResource}"/>.</returns> 38public static IResourceBuilder<QdrantServerResource> AddQdrant(this IDistributedApplicationBuilder builder, 40IResourceBuilder<ParameterResource>? apiKey = null, 99/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 100public static IResourceBuilder<QdrantServerResource> WithDataVolume(this IResourceBuilder<QdrantServerResource> builder, string? name = null, bool isReadOnly = false) 114/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 115public static IResourceBuilder<QdrantServerResource> WithDataBindMount(this IResourceBuilder<QdrantServerResource> builder, string source, bool isReadOnly = false) 126/// <param name="builder">An <see cref="IResourceBuilder{T}"/> for <see cref="ProjectResource"/></param> 129public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, IResourceBuilder<QdrantServerResource> qdrantResource)
Aspire.Hosting.Qdrant.Tests (25)
AddQdrantTests.cs (13)
23var qd = appBuilder.AddQdrant("qd"); 33var qd = appBuilder.AddQdrant("qd"); 114var pass = appBuilder.AddParameter("pass"); 156var pass = appBuilder.AddParameter("pass"); 158var qdrant = appBuilder.AddQdrant("my-qdrant", pass) 173var pass = appBuilder.AddParameter("pass"); 175var qdrant = appBuilder.AddQdrant("my-qdrant", pass) 179var projectA = appBuilder.AddProject<ProjectA>("projecta", o => o.ExcludeLaunchProfile = true) 191var container1 = appBuilder.AddContainer("container1", "fake") 208var qdrant = appBuilder.AddQdrant("qdrant"); 245var apiKeyParameter = appBuilder.AddParameter("QdrantApiKey"); 246var qdrant = appBuilder.AddQdrant("qdrant", apiKeyParameter); 283var qdrant = builder.AddQdrant("my-qdrant", grpcPort: 5503, httpPort: 5504);
QdrantFunctionalTests.cs (5)
36var qdrant = builder.AddQdrant("qdrant"); 104var qdrant1 = builder1.AddQdrant("qdrant"); 155var qdrant2 = builder2.AddQdrant("qdrant"); 235var resource = builder.AddQdrant("resource") 238var dependentResource = builder.AddQdrant("dependentresource")
QdrantPublicApiTests.cs (7)
39IResourceBuilder<QdrantServerResource> builder = null!; 50IResourceBuilder<QdrantServerResource> builder = null!; 63var qdrant = builderResource.AddQdrant("Qdrant"); 75IResourceBuilder<IResourceWithEnvironment> builder = null!; 77var qdrantResource = builderResource.AddQdrant("Qdrant"); 89var qdrant = builder.AddQdrant("Qdrant"); 90IResourceBuilder<QdrantServerResource> qdrantResource = null!;
Aspire.Hosting.RabbitMQ (20)
RabbitMQBuilderExtensions.cs (20)
27/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 28public static IResourceBuilder<RabbitMQServerResource> AddRabbitMQ(this IDistributedApplicationBuilder builder, 30IResourceBuilder<ParameterResource>? userName = null, 31IResourceBuilder<ParameterResource>? password = null, 63var rabbitmq = builder.AddResource(rabbitMq) 83/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 84public static IResourceBuilder<RabbitMQServerResource> WithDataVolume(this IResourceBuilder<RabbitMQServerResource> builder, string? name = null, bool isReadOnly = false) 98/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 99public static IResourceBuilder<RabbitMQServerResource> WithDataBindMount(this IResourceBuilder<RabbitMQServerResource> builder, string source, bool isReadOnly = false) 117/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 119public static IResourceBuilder<RabbitMQServerResource> WithManagementPlugin(this IResourceBuilder<RabbitMQServerResource> builder) 126/// <inheritdoc cref="WithManagementPlugin(IResourceBuilder{RabbitMQServerResource})" /> 130/// Use <see cref="WithManagementPlugin(IResourceBuilder{RabbitMQServerResource}, int?)"/> to specify a port to access the RabbitMQ management UI page. 137public static IResourceBuilder<RabbitMQServerResource> WithManagementPlugin(this IResourceBuilder<RabbitMQServerResource> builder, int? port) 238private static IResourceBuilder<RabbitMQServerResource> RunWithStableNodeName(this IResourceBuilder<RabbitMQServerResource> builder)
Aspire.Hosting.RabbitMQ.Tests (23)
AddRabbitMQTests.cs (12)
19var rmq = appBuilder.AddRabbitMQ("rmq"); 29var rmq = appBuilder.AddRabbitMQ("rmq"); 42var rabbitmq = appBuilder.AddRabbitMQ("rabbit"); 97var pass = appBuilder.AddParameter("pass"); 129var rabbitmq = appBuilder.AddRabbitMQ("rabbit"); 159var rabbitmq = appBuilder.AddRabbitMQ("rabbit"); 173var rabbitmq = appBuilder.AddRabbitMQ("rabbit"); 187var rabbitmq = appBuilder.AddRabbitMQ("rabbit"); 200var rabbit = builder.AddRabbitMQ("rabbit"); 247var userNameParameter = builder.AddParameter("user"); 248var passwordParameter = builder.AddParameter("pass"); 250var rabbit = builder.AddRabbitMQ("rabbit", userNameParameter, passwordParameter);
RabbitMQFunctionalTests.cs (6)
34var resource = builder.AddRabbitMQ("resource") 37var dependentResource = builder.AddRabbitMQ("dependentresource") 67var rabbitMQ = builder.AddRabbitMQ("rabbitMQ"); 110var rabbitMQ1 = builder1.AddRabbitMQ("rabbitMQ"); 171var passwordParameter2 = builder2.AddParameter("pwd"); 174var rabbitMQ2 = builder2.AddRabbitMQ("rabbitMQ", password: passwordParameter2);
RabbitMQPublicApiTests.cs (5)
39IResourceBuilder<RabbitMQServerResource> builder = null!; 50IResourceBuilder<RabbitMQServerResource> builder = null!; 63var rabbitMQ = builderResource.AddRabbitMQ("rabbitMQ"); 75IResourceBuilder<RabbitMQServerResource> builder = null!; 86IResourceBuilder<RabbitMQServerResource> builder = null!;
Aspire.Hosting.Redis (39)
RedisBuilderExtensions.cs (39)
29/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 33/// using the <see cref="ResourceBuilderExtensions.WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> 39public static IResourceBuilder<RedisResource> AddRedis(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port = null) 73/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for the <see cref="RedisResource"/>.</param> 77public static IResourceBuilder<RedisResource> WithRedisCommander(this IResourceBuilder<RedisResource> builder, Action<IResourceBuilder<RedisCommanderResource>>? configureContainer = null, string? containerName = null) 83var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingRedisCommanderResource); 92var resourceBuilder = builder.ApplicationBuilder.AddResource(resource) 140/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for the <see cref="RedisResource"/>.</param> 144public static IResourceBuilder<RedisResource> WithRedisInsight(this IResourceBuilder<RedisResource> builder, Action<IResourceBuilder<RedisInsightResource>>? configureContainer = null, string? containerName = null) 150var builderForExistingResource = builder.ApplicationBuilder.CreateResourceBuilder(existingRedisCommanderResource); 159var resourceBuilder = builder.ApplicationBuilder.AddResource(resource) 327public static IResourceBuilder<RedisCommanderResource> WithHostPort(this IResourceBuilder<RedisCommanderResource> builder, int? port) 343public static IResourceBuilder<RedisInsightResource> WithHostPort(this IResourceBuilder<RedisInsightResource> builder, int? port) 357/// Use <see cref="WithPersistence(IResourceBuilder{RedisResource}, TimeSpan?, long)"/> to adjust Redis persistence configuration, e.g.: 370/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 371public static IResourceBuilder<RedisResource> WithDataVolume(this IResourceBuilder<RedisResource> builder, string? name = null, bool isReadOnly = false) 387/// Use <see cref="WithPersistence(IResourceBuilder{RedisResource}, TimeSpan?, long)"/> to adjust Redis persistence configuration, e.g.: 400/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 401public static IResourceBuilder<RedisResource> WithDataBindMount(this IResourceBuilder<RedisResource> builder, string source, bool isReadOnly = false) 418/// Use with <see cref="WithDataBindMount(IResourceBuilder{RedisResource}, string, bool)"/> 419/// or <see cref="WithDataVolume(IResourceBuilder{RedisResource}, string?, bool)"/> to persist Redis data across sessions with custom persistence configuration, e.g.: 429/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 430public static IResourceBuilder<RedisResource> WithPersistence(this IResourceBuilder<RedisResource> builder, TimeSpan? interval = null, long keysChangedThreshold = 1) 449/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 451public static IResourceBuilder<RedisInsightResource> WithDataVolume(this IResourceBuilder<RedisInsightResource> builder, string? name = null) 463/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 464public static IResourceBuilder<RedisInsightResource> WithDataBindMount(this IResourceBuilder<RedisInsightResource> builder, string source)
Aspire.Hosting.Redis.Tests (42)
AddRedisTests.cs (13)
19var redis = builder.AddRedis("redis"); 100var redis = builder.AddRedis("redis"); 210var redis = builder.AddRedis("myredis1").WithRedisCommander(); 232var redis1 = builder.AddRedis("myredis1").WithRedisCommander(); 233var redis2 = builder.AddRedis("myredis2").WithRedisCommander(); 259var redis = builder.AddRedis("myRedis"); 284var redis = builder.AddRedis("myRedis"); 306var redis = builder.AddRedis("myRedis") 325var redis = builder.AddRedis("myRedis") 337var redis = builder.AddRedis("myRedis") 356var redis = builder.AddRedis("myRedis") 368var redis = builder.AddRedis("myRedis") 388var redis = builder.AddRedis("myRedis")
RedisFunctionalTests.cs (21)
38var resource = builder.AddRedis("resource") 41var dependentResource = builder.AddRedis("dependentresource") 71IResourceBuilder<RedisCommanderResource>? commanderBuilder = null; 72var redis = builder.AddRedis("redis").WithRedisCommander(c => commanderBuilder = c); 95var redis = builder.AddRedis("redis"); 140IResourceBuilder<RedisInsightResource>? redisInsightBuilder = null; 141var redis1 = builder1.AddRedis("redisForInsightPersistence") 181var redis2 = builder2.AddRedis("redisForInsightPersistence") 238var redis1 = builder.AddRedis("redis-1"); 239IResourceBuilder<RedisInsightResource>? redisInsightBuilder = null; 240var redis2 = builder.AddRedis("redis-2").WithRedisInsight(c => redisInsightBuilder = c); 299var redis1 = builder1.AddRedis("redis"); 342var redis2 = builder2.AddRedis("redis").WithDataVolume(volumeName); 391var redis1 = builder1.AddRedis("redis").WithDataBindMount(bindMountPath); 427var redis2 = builder2.AddRedis("redis").WithDataBindMount(bindMountPath); 475var redis1 = builder1.AddRedis("redis"); 506var redis2 = builder2.AddRedis("redis"); 552IResourceBuilder<RedisInsightResource>? redisInsightBuilder1 = null; 553var redis1 = builder1.AddRedis("redis") 601IResourceBuilder<RedisInsightResource>? redisInsightBuilder2 = null; 602var redis2 = builder2.AddRedis("redis")
RedisPublicApiTests.cs (8)
41IResourceBuilder<RedisResource> builder = null!; 52IResourceBuilder<RedisResource> builder = null!; 63IResourceBuilder<RedisCommanderResource> builder = null!; 75IResourceBuilder<RedisInsightResource> builder = null!; 87IResourceBuilder<RedisResource> builder = null!; 98IResourceBuilder<RedisResource> builder = null!; 111var redis = builder.AddRedis("Redis"); 123IResourceBuilder<RedisResource> builder = null!;
Aspire.Hosting.Seq (7)
SeqBuilderExtensions.cs (7)
27public static IResourceBuilder<SeqResource> AddSeq( 49/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 50public static IResourceBuilder<SeqResource> WithDataVolume(this IResourceBuilder<SeqResource> builder, string? name = null, bool isReadOnly = false) 59/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 60public static IResourceBuilder<SeqResource> WithDataBindMount(this IResourceBuilder<SeqResource> builder, string source, bool isReadOnly = false)
Aspire.Hosting.SqlServer (12)
SqlServerBuilderExtensions.cs (12)
25/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 26public static IResourceBuilder<SqlServerServerResource> AddSqlServer(this IDistributedApplicationBuilder builder, [ResourceName] string name, IResourceBuilder<ParameterResource>? password = null, int? port = null) 69/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 70public static IResourceBuilder<SqlServerDatabaseResource> AddDatabase(this IResourceBuilder<SqlServerServerResource> builder, [ResourceName] string name, string? databaseName = null) 89/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 90public static IResourceBuilder<SqlServerServerResource> WithDataVolume(this IResourceBuilder<SqlServerServerResource> builder, string? name = null, bool isReadOnly = false) 103/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 104public static IResourceBuilder<SqlServerServerResource> WithDataBindMount(this IResourceBuilder<SqlServerServerResource> builder, string source, bool isReadOnly = false)
Aspire.Hosting.SqlServer.Tests (28)
AddSqlServerTests.cs (15)
20var sql = appBuilder.AddSqlServer("sql"); 30var sql = appBuilder.AddSqlServer("sql"); 85var pass = appBuilder.AddParameter("pass"); 107var pass = appBuilder.AddParameter("pass"); 129var sqlServer = builder.AddSqlServer("sqlserver"); 130var db = sqlServer.AddDatabase("db"); 170var pass = builder.AddParameter("pass"); 172var sqlServer = builder.AddSqlServer("sqlserver", pass); 202var db = builder.AddSqlServer("sqlserver1"); 216var db = builder.AddSqlServer("sqlserver2"); 225var sqlserver1 = builder.AddSqlServer("sqlserver1"); 227var db1 = sqlserver1.AddDatabase("db1", "customers1"); 228var db2 = sqlserver1.AddDatabase("db2", "customers2"); 242var db1 = builder.AddSqlServer("sqlserver1") 245var db2 = builder.AddSqlServer("sqlserver2")
SqlServerFunctionalTests.cs (9)
34var resource = builder.AddSqlServer("resource") 37var dependentResource = builder.AddSqlServer("dependentresource") 72var sqlserver = builder.AddSqlServer("sqlserver"); 73var tempDb = sqlserver.AddDatabase("tempdb"); 137var sqlserver1 = builder1.AddSqlServer("sqlserver"); 138var masterdb1 = sqlserver1.AddDatabase("master"); 242var passwordParameter2 = builder2.AddParameter("pwd"); 246var sqlserver2 = builder2.AddSqlServer("sqlserver", passwordParameter2); 247var masterdb2 = sqlserver2.AddDatabase("master");
SqlServerPublicApiTests.cs (4)
39IResourceBuilder<SqlServerServerResource> builder = null!; 77IResourceBuilder<SqlServerServerResource> builder = null!; 88IResourceBuilder<SqlServerServerResource> builder = null!; 101var SqlServer = builderResource.AddSqlServer("SqlServer");
Aspire.Hosting.Testing (4)
DistributedApplicationTestingBuilder.cs (4)
176public IResourceBuilder<T> AddResource<T>(T resource) where T : IResource => innerBuilder.AddResource(resource); 184public IResourceBuilder<T> CreateResourceBuilder<T>(T resource) where T : IResource => innerBuilder.CreateResourceBuilder(resource); 287IResourceBuilder<T> AddResource<T>(T resource) where T : IResource; 295IResourceBuilder<T> CreateResourceBuilder<T>(T resource) where T : IResource;
Aspire.Hosting.Testing.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
31public static async Task WaitForHealthyAsync<T>(this DistributedApplication app, IResourceBuilder<T> resource, CancellationToken cancellationToken = default) where T: IResource
Aspire.Hosting.Tests (181)
AddParameterTests.cs (5)
105var parameter = appBuilder.AddParameter("pass"); 248var parameter = appBuilder.AddParameter("pass", genParam); 285var parameter1 = appBuilder.AddParameter("val1", new GenerateParameterDefault(), persist: true); 289var parameter2 = appBuilder.AddParameter("val2", new GenerateParameterDefault()); 304var parameter = appBuilder.AddParameterFromConfiguration("val", "Auth:AccessToken");
Codespaces\CodespacesUrlRewriterTests.cs (2)
28var resource = builder.AddResource(new CustomResource("resource")); 66var resource = builder.AddResource(new CustomResource("resource"));
Dashboard\DashboardResourceTests.cs (1)
95var container = builder.AddContainer(KnownResourceNames.AspireDashboard, "my-image");
Dashboard\DashboardServiceTests.cs (1)
90var builder = applicationBuilder.AddResource(testResource);
Dcp\ApplicationExecutorTests.cs (13)
108var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 140var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 172var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 205var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 365(Action<IResourceBuilder<ExecutableResource>> AddEndpoint, string ErrorMessageFragment)[] testcases = [ 394var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo"); 809(Action<IResourceBuilder<ContainerResource>> AddEndpoint, string ErrorMessageFragment)[] testcases = [ 833var ctr = builder.AddContainer("database", "image"); 976var container = builder.AddContainer("database", "image"); 977var exe = builder.AddExecutable("node", "node.exe", "."); 978var project = builder.AddProject<TestProject>("project"); 996var parentResource = builder.AddContainer("database", "image"); 997var childResource = builder.AddResource(new CustomChildResource("child", parentResource.Resource));
DistributedApplicationTests.cs (4)
791var redis = builder.AddRedis("redis", 1234).WithEndpoint("tcp", endpoint => 797var redisNoPort = builder.AddRedis("redisNoPort").WithEndpoint("tcp", endpoint => 801var servicea = builder.AddProject<Projects.ServiceA>("servicea") 844var redis = builder.AddContainer("dummyRedis", "redis").WithEndpoint("tcp", endpoint =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
180var redis = builder.AddRedis("redis");
ExecutableResourceTests.cs (2)
21var exe1 = appBuilder.AddExecutable("e1", "ruby", ".", "app.rb") 28var exe2 = appBuilder.AddExecutable("e2", "python", ".", "app.py", exe1.GetEndpoint("ep"))
ExpressionResolverTests.cs (4)
35var target = builder.AddResource(new TestExpressionResolverResource(exprName)) 58var source = builder.AddResource(new ContainerResource("testSource")) 86var test = builder.AddResource(new ContainerResource("testSource")) 108var test = builder.AddResource(new ContainerResource("testSource"))
Health\ResourceHealthCheckServiceTests.cs (10)
22var resource = builder.AddResource(new ParentResource("resource")); 55var resource = builder.AddResource(new ParentResource("resource")) 98var resource = builder.AddResource(new ParentResource("resource")) 145var resource = builder.AddResource(new ParentResource("resource")) 179var resource = builder.AddResource(new ParentResource("resource")); 216var resource = builder.AddResource(new ParentResource("resource")) 256var parent = builder.AddResource(new ParentResource("parent")) 315var parent = builder.AddResource(new ParentResource("parent")) 362var parent = builder.AddResource(new ParentResource("parent")) 372var child = builder.AddResource(new ChildResource("child", parent.Resource));
HealthCheckTests.cs (2)
74var resource = builder.AddContainer("resource", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 79var dependentResource = builder.AddContainer("dependentresource", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22")
KestrelConfigTests.cs (2)
350Action<IResourceBuilder<ProjectResource>>? callback = null, 354var projectBuilder = appBuilder.AddProject<TProject>("projectName", configure ?? (_ => { }));
ManifestGenerationTests.cs (3)
97var redis = builder.AddContainer("redis", "redis"); 177var resourceBuilder = program.AppBuilder.AddExecutable("program", "run program", "c:/", addExecutableArgs); 498var param = appBuilder.AddParameter("param");
ProjectResourceTests.cs (4)
419var builder = appBuilder.AddProject<TestProjectWithManyAppUrlsInLaunchSettings>("projectName"); 467var project = appBuilder.AddProject<TestProjectWithLaunchSettings>("projectName"); 571var c1 = appBuilder.AddContainer("c1", "image2") 578var project = appBuilder.AddProject<TestProjectWithLaunchSettings>("projectName")
PublishAsConnectionStringTests.cs (1)
17var redis = builder.AddRedis("redis").PublishAsConnectionString();
PublishAsDockerfileTests.cs (3)
17var frontend = builder.AddNpmApp("frontend", "NodeFrontend", "watch") 46var frontend = builder.AddNpmApp("frontend", "NodeFrontend", "watch") 88var frontend = builder.AddNpmApp("frontend", "NodeFrontend", "watch")
ResourceCommandAnnotationTests.cs (1)
40var resourceBuilder = builder.AddContainer("name", "image");
ResourceExtensionsTests.cs (22)
16var parent = builder.AddResource(new ParentResource("parent")); 27var parent = builder.AddResource(new ParentResource("parent")) 39var parent = builder.AddResource(new ParentResource("parent")) 51var parent = builder.AddResource(new ParentResource("parent")) 63var parent = builder.AddResource(new ParentResource("parent")); 74var parent = builder.AddResource(new ParentResource("parent")) 86var parent = builder.AddResource(new ParentResource("parent")) 89var child = builder.AddResource(new ChildResource("child", parent.Resource)) 101var parent = builder.AddResource(new ParentResource("parent")) 104var child = builder.AddResource(new ChildResource("child", parent.Resource)); 115var parent = builder.AddResource(new ParentResource("parent")) 118var child = builder.AddResource(new ChildResource("child", parent.Resource)) 130var parent = builder.AddResource(new ParentResource("parent")) 133var child = builder.AddResource(new ChildResource("child", parent: parent.Resource)) 136var grandchild = builder.AddResource(new ChildResource("grandchild", parent: child.Resource)) 148var container = builder.AddContainer("grafana", "grafana/grafana", "latest").WithImageSHA256("1adbcc2df3866ff5ec1d836e9d2220c904c7f98901b918d3cc5e1118ab1af991"); 158var container = builder.AddContainer("grafana", "grafana/grafana", "10.3.1"); 168var container = builder.AddContainer("elasticsearch", "library/elasticsearch", "8.14.0") 202var passwordParameter = builder.AddParameter("ElasticPassword"); 204var container = builder.AddContainer("elasticsearch", "library/elasticsearch", "8.14.0") 235var passwordParameter = builder.AddParameter("ElasticPassword"); 237var container = builder.AddContainer("elasticsearch", "library/elasticsearch", "8.14.0")
ResourceNotificationTests.cs (1)
20var custom = builder.AddResource(new CustomResource("myResource"))
Schema\SchemaTests.cs (4)
67var p = builder.AddParameter("p"); 85var p = builder.AddParameter("p", secret: true); 144var minReplicas = builder.AddParameter("minReplicas"); 165var minReplicas = builder.AddParameter("minReplicas");
SlimTestProgramTests.cs (2)
54foreach (var projectBuilders in testProgram.ServiceProjectBuilders) 72foreach (var projectBuilders in testProgram.ServiceProjectBuilders)
Utils\LoggerNotificationExtensions.cs (1)
31public static async Task WaitForHealthyAsync<T>(this DistributedApplication app, IResourceBuilder<T> resource, CancellationToken cancellationToken = default) where T: IResource
Utils\TestDistributedApplicationBuilder.cs (2)
136public IResourceBuilder<T> AddResource<T>(T resource) where T : IResource => _innerBuilder.AddResource(resource); 143public IResourceBuilder<T> CreateResourceBuilder<T>(T resource) where T : IResource
Utils\VolumeNameGeneratorTests.cs (4)
19var resource = builder.AddResource(new TestResource("myresource")); 31var resource = builder.AddResource(new TestResource("myresource")); 61var runResource = runBuilder.AddResource(new TestResource("myresource")); 62var publishResource = publishBuilder.AddResource(new TestResource("myresource"));
Utils\WithAnnotationTests.cs (3)
14var redis = builder.AddRedis("redis") 28var redis = builder.AddRedis("redis") 42var redis = builder.AddRedis("redis").WithAnnotation<DummyAnnotation>();
WaitForTests.cs (21)
20var throwingResource = builder.AddContainer("throwingresource", "doesnotmatter") 22var dependingContainerResource = builder.AddContainer("dependingcontainerresource", "doesnotmatter") 24var dependingExecutableResource = builder.AddExecutable("dependingexecutableresource", "doesnotmatter", "alsodoesntmatter") 43var resource = builder.AddResource(new CustomResource("test")); 64var parentResourceBuilder = builder.AddResource(new CustomResource("parent")); 65var childResourceBuilder = builder.AddResource(new CustomChildResource("child", parentResourceBuilder.Resource)); 88var dependency = builder.AddResource(new CustomResource("test")); 89var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 129var dependency = builder.AddResource(new CustomResource("test")); 130var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 177var dependency = builder.AddResource(new CustomResource("test")); 178var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 225var dependency = builder.AddResource(new CustomResource("test")); 226var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 272var dependency = builder.AddResource(new CustomResource("test")) 275var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 307var dependency = builder.AddResource(new CustomResource("test")); 309var nginx = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") 347var parentResource = builder.AddResource(new CustomResource("parent")); 348var childResource = builder.AddResource(new CustomChildResource("child", parentResource.Resource)); 349var containerResource = builder.AddContainer("container", "image", "tag")
WithEndpointTests.cs (19)
22var projectA = builder.AddProject<ProjectA>("projecta") 39var projectA = builder.AddProject<ProjectA>("projecta") 74var projectA = builder.AddProject<ProjectA>("projecta") 111var projectA = builder.AddProject<ProjectA>("projecta") 129var projectA = builder.AddProject<ProjectA>("projecta") 146var projectA = builder.AddProject<ProjectA>("projecta").WithEndpoint("mybinding", endpoint => 230var container = builder.AddContainer("app", "image") 248var container = builder.AddContainer("app", "image") 269var container = builder.AddContainer("app", "image") 297var container = builder.AddContainer("app", "image") 324var container = builder.AddContainer("app", "image") 351var container = builder.AddContainer("app", "image") 378var container = builder.AddContainer("app", "image") 405var container = builder.AddContainer("app", "image") 432var container = builder.AddContainer("app", "image") 459var project = builder.AddProject<TestProject>("proj") 521var project = builder.AddProject<TestProject>("proj") 557var container0 = builder.AddContainer("app0", "image") 560var container1 = builder.AddContainer("app1", "image")
WithEnvironmentTests.cs (20)
19var container = builder.AddContainer("container", "image") 43var projectA = builder.AddProject<ProjectA>("project") 50var projectB = builder.AddProject<ProjectB>("projectB") 63var project = builder.AddProject<ProjectA>("projectA") 79var project = builder.AddProject<ProjectA>("projectA") 93var projectA = builder.AddProject<ProjectA>("projectA").WithEnvironment("myName", () => environmentValue); 110var parameter = builder.AddParameter("parameter"); 112var projectA = builder.AddProject<ProjectA>("projectA") 125var parameter = builder.AddParameter("parameter"); 127var projectA = builder.AddProject<ProjectA>("projectA") 141var parameter = builder.AddParameter("parameter"); 143var projectA = builder.AddProject<ProjectA>("projectA") 161var projectA = builder.AddProject<ProjectA>("projectA") 180var test = builder.AddResource(new TestResource("test", "connectionString")); 182var container = builder.AddContainer("container1", "image") 191var containerB = builder.AddContainer("container2", "imageB") 218var container = builder.AddContainer("container1", "image") 227var containerB = builder.AddContainer("container2", "imageB") 245var sourceBuilder = builder.AddResource(new TestResource("sourceService", sourceCon)); 246var targetBuilder = builder.AddContainer("targetContainer", "targetImage");
WithReferenceTests.cs (23)
21var projectA = builder.AddProject<ProjectA>("projecta") 26var projectB = builder.AddProject<ProjectB>("b").WithReference(projectA.GetEndpoint(endpointName)); 39var projectA = builder.AddProject<ProjectA>("projecta") 47var projectB = builder.AddProject<ProjectB>("projectb") 64var projectA = builder.AddProject<ProjectA>("projecta") 72var projectB = builder.AddProject<ProjectB>("projectb") 89var projectA = builder.AddProject<ProjectA>("projecta") 96var projectB = builder.AddProject<ProjectB>("projectb") 111var projectA = builder.AddProject<ProjectA>("projecta") 118var projectB = builder.AddProject<ProjectB>("projectb") 133var resource = builder.AddResource(new TestResource("resource")); 149var resource = builder.AddResource(new TestResource("resource")); 165var missingResource = builder.AddConnectionString("missingresource"); 166var projectB = builder.AddProject<ProjectB>("projectb") 186var resource = builder.AddConnectionString("resource"); 187var projectB = builder.AddProject<ProjectB>("projectb") 202var resource = builder.AddConnectionString("resource"); 203var projectB = builder.AddProject<ProjectB>("projectb") 218var resource = builder.AddConnectionString("resource", "MY_ENV"); 219var projectB = builder.AddProject<ProjectB>("projectb") 234var resource = builder.AddResource(new TestResource("resource") 255var resource = builder.AddResource(new TestResource("resource") 292var projectA = builder.AddProject<ProjectA>("projecta")
Aspire.Hosting.Valkey (15)
ValkeyBuilderExtensions.cs (15)
54/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns> 55public static IResourceBuilder<ValkeyResource> AddValkey(this IDistributedApplicationBuilder builder, 94/// Use <see cref="WithPersistence(IResourceBuilder{ValkeyResource}, TimeSpan?, long)"/> to adjust Valkey persistence configuration, e.g.: 101/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 102public static IResourceBuilder<ValkeyResource> WithDataVolume(this IResourceBuilder<ValkeyResource> builder, 125/// Use <see cref="WithPersistence(IResourceBuilder{ValkeyResource}, TimeSpan?, long)"/> to adjust Valkey persistence configuration, e.g.: 132/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 133public static IResourceBuilder<ValkeyResource> WithDataBindMount(this IResourceBuilder<ValkeyResource> builder, 152/// Use with <see cref="WithDataBindMount(IResourceBuilder{ValkeyResource}, string, bool)"/> 153/// or <see cref="WithDataVolume(IResourceBuilder{ValkeyResource}, string?, bool)"/> to persist Valkey data across sessions with custom persistence configuration, e.g.: 160/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> 161public static IResourceBuilder<ValkeyResource> WithPersistence(this IResourceBuilder<ValkeyResource> builder,
Aspire.Hosting.Valkey.Tests (14)
AddValkeyTests.cs (9)
91var valkey = builder.AddValkey("myValkey"); 120var valkey = builder.AddValkey("myValkey"); 145var valkey = builder.AddValkey("myValkeydata"); 167var valkey = builder.AddValkey("myValkey") 186var valkey = builder.AddValkey("myValkey") 198var valkey = builder.AddValkey("myValkey") 217var valkey = builder.AddValkey("myValkey") 229var valkey = builder.AddValkey("myValkey") 249var valkey = builder.AddValkey("myValkey")
ValkeyFunctionalTests.cs (5)
26var valkey = builder.AddValkey("valkey"); 70var valkey1 = builder1.AddValkey("valkey"); 128var valkey2 = builder2.AddValkey("valkey"); 209var resource = builder.AddValkey("resource") 212var dependentResource = builder.AddValkey("dependentresource")
Aspire.Playground.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
31public static async Task WaitForHealthyAsync<T>(this DistributedApplication app, IResourceBuilder<T> resource, CancellationToken cancellationToken = default) where T: IResource
AzureContainerApps.AppHost (6)
Program.cs (6)
8var customDomain = builder.AddParameter("customDomain"); 9var certificateName = builder.AddParameter("certificateName"); 12var param = builder.AddParameter("secretparam", "fakeSecret", secret: true); 15var redis = builder.AddRedis("cache") 20var cosmosDb = builder.AddAzureCosmosDB("account") 25var blobs = builder.AddAzureStorage("storage")
AzureFunctionsEndToEnd.AppHost (5)
Program.cs (5)
3var storage = builder.AddAzureStorage("storage").RunAsEmulator(); 4var queue = storage.AddQueues("queue"); 5var blob = storage.AddBlobs("blob"); 6var eventHubs = builder.AddAzureEventHubs("eventhubs").RunAsEmulator().AddEventHub("myhub"); 12var funcApp = builder.AddAzureFunctionsProject<Projects.AzureFunctionsEndToEnd_Functions>("funcapp")
AzureSearch.AppHost (1)
Program.cs (1)
6var azureSearch = builder.AddAzureSearch("search");
AzureStorageEndToEnd.AppHost (3)
Program.cs (3)
6var storage = builder.AddAzureStorage("storage").RunAsEmulator(container => 11var blobs = storage.AddBlobs("blobs"); 12var queues = storage.AddQueues("queues");
BicepSample.AppHost (19)
Program.cs (19)
8var parameter = builder.AddParameter("val"); 18var bicep0 = builder.AddBicepTemplateString("test0", 27var kv = builder.AddAzureKeyVault("kv3"); 28var appConfig = builder.AddAzureAppConfiguration("appConfig").WithParameter("sku", "standard"); 29var storage = builder.AddAzureStorage("storage"); 32var blobs = storage.AddBlobs("blob"); 33var tables = storage.AddTables("table"); 34var queues = storage.AddQueues("queue"); 36var sqlServer = builder.AddAzureSqlServer("sql").AddDatabase("db"); 38var administratorLogin = builder.AddParameter("administratorLogin"); 39var administratorLoginPassword = builder.AddParameter("administratorLoginPassword", secret: true); 40var pg = builder.AddAzurePostgresFlexibleServer("postgres2") 44var cosmosDb = builder.AddAzureCosmosDB("cosmos") 47var logAnalytics = builder.AddAzureLogAnalyticsWorkspace("lawkspc"); 48var appInsights = builder.AddAzureApplicationInsights("ai", logAnalytics); 54var redis = builder.AddAzureRedis("redis"); 56var serviceBus = builder.AddAzureServiceBus("sb") 60var signalr = builder.AddAzureSignalR("signalr"); 61var webpubsub = builder.AddAzureWebPubSub("wps");
CdkSample.AppHost (19)
Program.cs (19)
12var cosmosdb = builder.AddAzureCosmosDB("cosmos").AddDatabase("cosmosdb"); 14var sku = builder.AddParameter("storagesku"); 15var locationOverride = builder.AddParameter("locationOverride"); 16var storage = builder.AddAzureStorage("storage") 24var blobs = storage.AddBlobs("blobs"); 26var sqldb = builder.AddAzureSqlServer("sql").AddDatabase("sqldb"); 28var signaturesecret = builder.AddParameter("signaturesecret", secret: true); 29var keyvault = builder.AddAzureKeyVault("mykv") 42var cache = builder.AddAzureRedis("cache"); 44var pgsqlAdministratorLogin = builder.AddParameter("pgsqlAdministratorLogin"); 45var pgsqlAdministratorLoginPassword = builder.AddParameter("pgsqlAdministratorLoginPassword", secret: true); 46var pgsqldb = builder.AddAzurePostgresFlexibleServer("pgsql") 50var pgsql2 = builder.AddAzurePostgresFlexibleServer("pgsql2") 53var sb = builder.AddAzureServiceBus("servicebus") 78var appConfig = builder.AddAzureAppConfiguration("appConfig"); 80var search = builder.AddAzureSearch("search"); 82var signalr = builder.AddAzureSignalR("signalr"); 84var logAnalyticsWorkspace = builder.AddAzureLogAnalyticsWorkspace("logAnalyticsWorkspace") 94var appInsights = builder.AddAzureApplicationInsights("appInsights", logAnalyticsWorkspace)
CosmosEndToEnd.AppHost (1)
Program.cs (1)
6var db = builder.AddAzureCosmosDB("cosmos")
CustomResources.AppHost (2)
TestResource.cs (2)
10public static IResourceBuilder<TestResource> AddTestResource(this IDistributedApplicationBuilder builder, string name) 14var rb = builder.AddResource(new TestResource(name))
Dapr.AppHost (3)
Program.cs (3)
3var rmq = builder.AddRabbitMQ("rabbitMQ") 8var stateStore = builder.AddDaprStateStore("statestore"); 9var pubSub = builder.AddDaprPubSub("pubsub")
DatabaseMigration.AppHost (1)
Program.cs (1)
6var db1 = builder.AddSqlServer("sql1").AddDatabase("db1");
Elasticsearch.AppHost (1)
Program.cs (1)
6var elasticsearch = builder.AddElasticsearch("elasticsearch")
EventHubs.AppHost (2)
Program.cs (2)
4var blob = builder.AddAzureStorage("ehstorage") 8var eventHub = builder.AddAzureEventHubs("eventhubns")
KafkaBasic.AppHost (1)
Program.cs (1)
6var kafka = builder.AddKafka("kafka")
Keycloak.AppHost (2)
Program.cs (2)
3var keycloak = builder.AddKeycloak("keycloak", 8080) 7var apiService = builder.AddProject<Projects.Keycloak_ApiService>("apiservice")
MilvusPlayground.AppHost (1)
Program.cs (1)
3var milvusdb = builder.AddMilvus("milvus")
Mongo.AppHost (1)
Program.cs (1)
6var db = builder.AddMongoDB("mongo")
MySqlDb.AppHost (1)
Program.cs (1)
7var catalogDb = builder.AddMySql("mysql")
Nats.AppHost (1)
Program.cs (1)
3var nats = builder.AddNats("nats")
OpenAIEndToEnd.AppHost (1)
Program.cs (1)
7var openai = builder.AddAzureOpenAI("openai").AddDeployment(
OracleEndToEnd.AppHost (2)
Program.cs (2)
6var oracle = builder.AddOracle("oracle"); 8var pdb = oracle.AddDatabase("FREEPDB1");
Orleans.AppHost (3)
Program.cs (3)
3var storage = builder.AddAzureStorage("storage").RunAsEmulator(); 4var clusteringTable = storage.AddTables("clustering"); 5var grainStorage = storage.AddBlobs("grainstate");
ParameterEndToEnd.AppHost (2)
Program.cs (2)
18var db = builder.AddSqlServer("sql") 22var insertionrows = builder.AddParameter("insertionrows");
PostgresEndToEnd.AppHost (13)
Program.cs (13)
7var db1 = builder.AddPostgres("pg1").WithPgAdmin().AddDatabase("db1"); 8var db2 = builder.AddPostgres("pg2").WithPgAdmin().AddDatabase("db2"); 9var pg3 = builder.AddPostgres("pg3").WithPgAdmin(); 10var db3 = pg3.AddDatabase("db3"); 11var db4 = pg3.AddDatabase("db4"); 14var db5 = builder.AddPostgres("pg4").WithPgAdmin().PublishAsContainer().AddDatabase("db5"); 15var db6 = builder.AddPostgres("pg5").WithPgAdmin().PublishAsContainer().AddDatabase("db6"); 16var pg6 = builder.AddPostgres("pg6").WithPgAdmin(c => c.WithHostPort(8999).WithImageTag("8.3")).PublishAsContainer(); 17var db7 = pg6.AddDatabase("db7"); 18var db8 = pg6.AddDatabase("db8"); 19var db9 = pg6.AddDatabase("db9", "db8"); // different connection string (db9) on same database as db8 22var db10 = builder.AddPostgres("pg10").WithPgAdmin().PublishAsConnectionString().AddDatabase("db10"); 24var db11 = builder.AddPostgres("pg11").WithPgWeb().AddDatabase("postgres");
ProxylessEndToEnd.AppHost (1)
Program.cs (1)
6var redis = builder.AddRedis("redis", 9999).WithEndpoint("tcp", (endpoint) =>
Qdrant.AppHost (1)
Program.cs (1)
6var qdrant = builder.AddQdrant("qdrant")
Redis.AppHost (3)
Program.cs (3)
3var redis = builder.AddRedis("redis") 8var garnet = builder.AddGarnet("garnet") 11var valkey = builder.AddValkey("valkey")
Seq.AppHost (1)
Program.cs (1)
6var seq = builder.AddSeq("seq");
SignalR.AppHost (1)
Program.cs (1)
3var signalr = builder.AddAzureSignalR("signalr1");
SqlServerEndToEnd.AppHost (5)
Program.cs (5)
6var sql1 = builder.AddAzureSqlServer("sql1") 9var db1 = sql1.AddDatabase("db1"); 11var sql2 = builder.AddSqlServer("sql2") 14var db2 = sql2.AddDatabase("db2"); 16var dbsetup = builder.AddProject<Projects.SqlServerEndToEnd_DbSetup>("dbsetup")
Stress.AppHost (13)
Program.cs (3)
12var rb = builder.AddTestResource(name); 18var nestedRb = builder.AddNestedResource(name, parent); 23var serviceBuilder = builder.AddProject<Projects.Stress_ApiService>("stress-apiservice", launchProfileName: null);
ResourceBuilderExtensions.cs (6)
11public static IResourceBuilder<TResource> WithHttpsCommand<TResource>(this IResourceBuilder<TResource> builder, 23public static IResourceBuilder<TResource> WithHttpCommand<TResource>(this IResourceBuilder<TResource> builder, 32private static IResourceBuilder<TResource> WithHttpCommandImpl<TResource>(this IResourceBuilder<TResource> builder,
TestResource.cs (4)
11public static IResourceBuilder<TestResource> AddTestResource(this IDistributedApplicationBuilder builder, string name) 15var rb = builder.AddResource(new TestResource(name)) 30public static IResourceBuilder<TestNestedResource> AddNestedResource(this IDistributedApplicationBuilder builder, string name, IResource parent) 32var rb = builder.AddResource(new TestNestedResource(name, parent))
TestProject.AppHost (8)
TestProgram.cs (8)
73var redis = AppBuilder.AddRedis("redis") 80var postgres = AppBuilder.AddPostgres("postgres") 110public IResourceBuilder<ProjectResource> ServiceABuilder { get; private set; } 111public IResourceBuilder<ProjectResource> ServiceBBuilder { get; private set; } 112public IResourceBuilder<ProjectResource> ServiceCBuilder { get; private set; } 113public IResourceBuilder<ProjectResource> WorkerABuilder { get; private set; } 114public IResourceBuilder<ProjectResource>? IntegrationServiceABuilder { get; private set; } 117public List<IResourceBuilder<ProjectResource>> ServiceProjectBuilders => [ServiceABuilder, ServiceBBuilder, ServiceCBuilder];
TestShop.AppHost (6)
Program.cs (6)
3var catalogDb = builder.AddPostgres("postgres") 8var basketCache = builder.AddRedis("basketcache") 22var catalogDbApp = builder.AddProject<Projects.CatalogDb>("catalogdbapp") 25var catalogService = builder.AddProject<Projects.CatalogService>("catalogservice") 29var messaging = builder.AddRabbitMQ("messaging") 34var basketService = builder.AddProject("basketservice", @"..\BasketService\BasketService.csproj")
WaitForSandbox.AppHost (3)
Program.cs (3)
6var db = builder.AddAzurePostgresFlexibleServer("pg") 17var dbsetup = builder.AddProject<Projects.WaitForSandbox_DbSetup>("dbsetup") 20var backend = builder.AddProject<Projects.WaitForSandbox_ApiService>("api")
WebPubSub.AppHost (2)
Program.cs (2)
4var wps = builder.AddAzureWebPubSub("wps1"); 5var web = builder.AddProject<Projects.WebPubSubWeb>("webfrontend")
WithDockerfile.AppHost (2)
Program.cs (2)
7var goVersion = builder.AddParameter("goversion"); 8var secret = builder.AddParameter("secret", secret: true);