Show / Hide Table of Contents

Class ServiceBusAccountAttribute

Attribute used to override the default ServiceBus account used by triggers and binders.

Inheritance
System.Attribute
ServiceBusAccountAttribute
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.WebJobs.Extensions.ServiceBus.dll
Syntax
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Parameter)]
public sealed class ServiceBusAccountAttribute : Attribute, Microsoft.Azure.WebJobs.IConnectionProvider
Remarks

This attribute can be applied at the parameter/method/class level, and the precedence

is in that order.

Constructors

ServiceBusAccountAttribute(String)

Constructs a new instance.

Declaration
public ServiceBusAccountAttribute (string account);
Parameters
System.String account

A string value indicating the Service Bus connection string to use. This string should be in one of the following formats. These checks will be applied in order and the first match wins. - The name of an "AzureWebJobs" prefixed app setting or connection string name. E.g., if your setting name is "AzureWebJobsMyServiceBus", you can specify "MyServiceBus" here. - Can be a string containing %% values (e.g. %StagingServiceBus%). The value provided will be passed to any INameResolver registered on the JobHostConfiguration to resolve the actual setting name to use. - Can be an app setting or connection string name of your choosing.

Properties

Account

Gets or sets the name of the app setting that contains the Service Bus connection string.

Declaration
public string Account { get; }
Property Value
System.String

Explicit Interface Implementations

IConnectionProvider.Connection

Gets or sets the app setting name that contains the Service Bus connection string.

Declaration
string Microsoft.Azure.WebJobs.IConnectionProvider.Connection { get; set; }
Returns
System.String

Back to top Azure SDK for .NET