// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions;
namespace Microsoft.Azure.Functions.Worker
{
public sealed class ServiceBusOutputAttribute : OutputBindingAttribute
{
///
/// Initializes a new instance of the class.
///
/// The name of the queue or topic to bind to.
/// The type of the entity to bind to.
public ServiceBusOutputAttribute(string queueOrTopicName, ServiceBusEntityType entityType = ServiceBusEntityType.Queue)
{
QueueOrTopicName = queueOrTopicName;
EntityType = entityType;
}
///
/// Gets the name of the queue or topic to bind to.
///
public string QueueOrTopicName { get; private set; }
///
/// Gets or sets the app setting name that contains the Service Bus connection string.
///
public string? Connection { get; set; }
///
/// Value indicating the type of the entity to bind to.
///
public ServiceBusEntityType EntityType { get; set; }
}
}