microsoft / microsoft/aspire

Make the `AzureServiceBusEmulatorResource` field `AzureServiceBusResource _innerResource` a public property

Open
#13,689 0 comments 0 reactions 0 assignees View on GitHub
area-integrations azure-servicebus
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

This would allow adding extensions to the emulator resource instead of on the main resource for a cleaner API

for example - https://github.com/andrewjpoole/aspire-asb-emulator-ui/issues/1
```cs
var serviceBus = builder
.AddAzureServiceBus("myservicebus")
.RunAsEmulator(c => c.WithLifetime(ContainerLifetime.Persistent).WithUi());
```

instead of doing something like this:
```cs
var serviceBus = builder
.AddAzureServiceBus("myservicebus")
.RunAsEmulator(c => c.WithLifetime(ContainerLifetime.Persistent))
.WithUi();
```

the UI here applies only when using the emulator, not in a real environment

### Describe the solution you'd like

https://github.com/dotnet/aspire/blob/1bd0aa7212960b9689eafc8426daf73930743559/src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusEmulatorResource.cs#L19

make this a public get property instead of a private field

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.