Table of Contents

Class AzureQueueOptions

Namespace
Savvyio.Extensions.QueueStorage
Assembly
Savvyio.Extensions.QueueStorage.dll

Configuration options for AzureQueue<TRequest>.

public class AzureQueueOptions : IValidatableParameterObject, IParameterObject
Inheritance
AzureQueueOptions
Implements
Derived

Constructors

AzureQueueOptions()

Initializes a new instance of the AzureQueueOptions class.

public AzureQueueOptions()

Remarks

The following table shows the initial property values for an instance of AzureQueueOptions.

PropertyInitial Value
Credentialnew DefaultAzureCredential()
StorageAccountNamenull
Settingsnew QueueClientOptions()
ReceiveContextnew AzureQueueReceiveOptions()
SendContextnew AzureQueueSendOptions()
QueueNamenull
SasCredentialnull
StorageKeyCredentialnull
ConnectionStringnull

Fields

MaxNumberOfMessages

The maximum number of messages that Azure Queue Storage supports when retrieving.

public const int MaxNumberOfMessages = 32

Field Value

int

MaxVisibilityTimeout

The maximum visibility timeout for messages in Azure Queue Storage.

public static readonly TimeSpan MaxVisibilityTimeout

Field Value

TimeSpan

Properties

ConnectionString

Gets or sets the connection string used to connect to the Azure storage account.

public string ConnectionString { get; set; }

Property Value

string

Credential

Gets or sets the credential used to authenticate with Azure.

public TokenCredential Credential { get; set; }

Property Value

TokenCredential

Remarks

Setting this property will nullify SasCredential and StorageKeyCredential as they are mutually exclusive.

QueueName

Gets or sets the name of the queue.

public string QueueName { get; set; }

Property Value

string

ReceiveContext

Gets the options for receiving messages from the queue.

public AzureQueueReceiveOptions ReceiveContext { get; }

Property Value

AzureQueueReceiveOptions

SasCredential

Gets or sets the SAS credential used to authenticate with Azure.

public AzureSasCredential SasCredential { get; set; }

Property Value

AzureSasCredential

Remarks

Setting this property will nullify Credential and StorageKeyCredential as they are mutually exclusive.

SendContext

Gets the options for sending messages to the queue.

public AzureQueueSendOptions SendContext { get; }

Property Value

AzureQueueSendOptions

Settings

Gets the settings for the QueueClient>.

public QueueClientOptions Settings { get; }

Property Value

QueueClientOptions

StorageAccountName

Gets or sets the name of the storage account.

public string StorageAccountName { get; set; }

Property Value

string

StorageKeyCredential

Gets or sets the storage key credential used to authenticate with Azure.

public StorageSharedKeyCredential StorageKeyCredential { get; set; }

Property Value

StorageSharedKeyCredential

Remarks

Setting this property will nullify Credential and SasCredential as they are mutually exclusive.

Methods

PostConfigureClient(Action<QueueClient>)

Provides a way to post-configure the client after it has been created.

public AzureQueueOptions PostConfigureClient(Action<QueueClient> factory)

Parameters

factory Action<QueueClient>

The delegate to post-configure the client.

Returns

AzureQueueOptions

A reference to this instance.

Remarks

ValidateOptions()

Validates the options to ensure they are in a valid state.

public void ValidateOptions()

Exceptions

InvalidOperationException

QueueName cannot be null, empty, or consists only of white-space characters when ConnectionString was specified -or- Credential and SasCredential and StorageKeyCredential cannot be null -or- StorageAccountName and QueueName cannot be null, empty, or consists only of white-space characters.