QueueAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attribute used to bind a parameter to an Azure Queue.
[Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))]
[Microsoft.Azure.WebJobs.Description.Binding]
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue)]
public class QueueAttribute : Attribute, Microsoft.Azure.WebJobs.IConnectionProvider
[<Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))>]
[<Microsoft.Azure.WebJobs.Description.Binding>]
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue)>]
type QueueAttribute = class
inherit Attribute
interface IConnectionProvider
Public Class QueueAttribute
Inherits Attribute
Implements IConnectionProvider
- Inheritance
-
QueueAttribute
- Attributes
-
Microsoft.Azure.WebJobs.ConnectionProviderAttribute Microsoft.Azure.WebJobs.Description.BindingAttribute AttributeUsageAttribute
- Implements
-
Microsoft.Azure.WebJobs.IConnectionProvider
Remarks
The method parameter type can be one of the following:
- QueueClient
- QueueMessage (out parameter)
- String (out parameter)
- byte[] (out parameter)
- BinaryData (out parameter)
- A user-defined type (out parameter, serialized as JSON)
- Microsoft.Azure.WebJobs.ICollector`1 of these types (to enqueue multiple messages via Microsoft.Azure.WebJobs.ICollector`1.Add(`0)
- Microsoft.Azure.WebJobs.IAsyncCollector`1 of these types (to enqueue multiple messages via Microsoft.Azure.WebJobs.IAsyncCollector`1.AddAsync(`0,System.Threading.CancellationToken)
By default the extension Base64-encodes outgoing messages. This behavior can be changed by setting MessageEncoding. For example, to configure Azure Functions to perform no base64 encoding/decoding, specify the following in host.json.
"extensions": {
"queues": {
"messageEncoding": "none"
}
}
Constructors
QueueAttribute(String) |
Initializes a new instance of the QueueAttribute class. |
Properties
Connection |
Gets or sets the app setting name that contains the Azure Storage connection string. |
QueueName |
Gets the name of the queue to which to bind. |
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기