23 references to AzureEventHubsResource
Aspire.Hosting.Azure.EventHubs (17)
AzureEventHubsEmulatorResource.cs (3)
9/// Wraps an <see cref="AzureEventHubsResource" /> in a type that exposes container extension methods. 12public class AzureEventHubsEmulatorResource(AzureEventHubsResource innerResource) : ContainerResource(innerResource.Name), IResource 17private readonly AzureEventHubsResource _innerResource = innerResource;
AzureEventHubsExtensions.cs (14)
28public static IResourceBuilder<AzureEventHubsResource> AddAzureEventHubs( 60var azureResource = (AzureEventHubsResource)infrastructure.AspireResource; 77var resource = new AzureEventHubsResource(name, configureInfrastructure); 83/// Adds an Azure Event Hubs hub resource to the application model. This resource requires an <see cref="AzureEventHubsResource"/> to be added to the application model. 89public static IResourceBuilder<AzureEventHubsResource> AddEventHub(this IResourceBuilder<AzureEventHubsResource> builder, [ResourceName] string name) 95/// Adds an Azure Event Hubs hub resource to the application model. This resource requires an <see cref="AzureEventHubsResource"/> to be added to the application model. 104public static IResourceBuilder<AzureEventHubsResource> WithHub(this IResourceBuilder<AzureEventHubsResource> builder, [ResourceName] string name, Action<EventHub>? configure = null) 120/// Configures an Azure Event Hubs resource to be emulated. This resource requires an <see cref="AzureEventHubsResource"/> to be added to the application model. 147public static IResourceBuilder<AzureEventHubsResource> RunAsEmulator(this IResourceBuilder<AzureEventHubsResource> builder, Action<IResourceBuilder<AzureEventHubsEmulatorResource>>? configureContainer = null) 229var eventHubsEmulatorResources = builder.ApplicationBuilder.Resources.OfType<AzureEventHubsResource>().Where(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);
Aspire.Hosting.Azure.Tests (6)
AzureEventHubsExtensionsTests.cs (6)
324var eventHubsEmulatorResource = builder.Resources.OfType<AzureEventHubsResource>().Single(x => x is { } eventHubsResource && eventHubsResource.IsEmulator); 376var eventHubsEmulatorResource = builder.Resources.OfType<AzureEventHubsResource>().Single(x => x is { } eventHubsResource && eventHubsResource.IsEmulator); 446var eventHubsEmulatorResource = builder.Resources.OfType<AzureEventHubsResource>().Single(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);