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.
12
public class AzureEventHubsEmulatorResource(
AzureEventHubsResource
innerResource) : ContainerResource(innerResource.Name), IResource
17
private readonly
AzureEventHubsResource
_innerResource = innerResource;
AzureEventHubsExtensions.cs (14)
28
public static IResourceBuilder<
AzureEventHubsResource
> AddAzureEventHubs(
60
var
azureResource = (
AzureEventHubsResource
)infrastructure.AspireResource;
77
var
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.
89
public 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.
104
public 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.
147
public static IResourceBuilder<
AzureEventHubsResource
> RunAsEmulator(this IResourceBuilder<
AzureEventHubsResource
> builder, Action<IResourceBuilder<AzureEventHubsEmulatorResource>>? configureContainer = null)
229
var eventHubsEmulatorResources = builder.ApplicationBuilder.Resources.OfType<
AzureEventHubsResource
>().Where(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);
Aspire.Hosting.Azure.Tests (6)
AzureEventHubsExtensionsTests.cs (6)
324
var
eventHubsEmulatorResource = builder.Resources.OfType<
AzureEventHubsResource
>().Single(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);
376
var
eventHubsEmulatorResource = builder.Resources.OfType<
AzureEventHubsResource
>().Single(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);
446
var
eventHubsEmulatorResource = builder.Resources.OfType<
AzureEventHubsResource
>().Single(x => x is { } eventHubsResource && eventHubsResource.IsEmulator);