2024-02-12 14:32:48 +00:00
|
|
|
using Elsa.MassTransit.AzureServiceBus.Models;
|
|
|
|
|
|
|
|
|
|
namespace Elsa.MassTransit.AzureServiceBus.Services;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides message topology information.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class MessageTopologyProvider
|
|
|
|
|
{
|
|
|
|
|
private readonly IEnumerable<MessageSubscriptionTopology> _subscriptionTopology;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides message topology information.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public MessageTopologyProvider(IEnumerable<MessageSubscriptionTopology> subscriptionTopology)
|
|
|
|
|
{
|
|
|
|
|
_subscriptionTopology = subscriptionTopology;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-02-16 13:00:28 +00:00
|
|
|
/// Retrieves all the temporary message subscriptions from the subscription topology.
|
2024-02-12 14:32:48 +00:00
|
|
|
/// </summary>
|
2024-02-16 13:00:28 +00:00
|
|
|
public IEnumerable<MessageSubscriptionTopology> GetTemporarySubscriptions()
|
2024-02-12 14:32:48 +00:00
|
|
|
{
|
2024-02-16 13:00:28 +00:00
|
|
|
return _subscriptionTopology.Where(x => x.IsTemporary);
|
2024-02-12 14:32:48 +00:00
|
|
|
}
|
|
|
|
|
}
|