-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathRabbitMQTriggerAttribute.cs
36 lines (31 loc) · 1.21 KB
/
RabbitMQTriggerAttribute.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using Microsoft.Azure.WebJobs.Description;
namespace Microsoft.Azure.WebJobs;
/// <summary>
/// Attribute used to bind a parameter to RabbitMQ trigger message.
/// </summary>
/// <remarks>
/// Initializes a new instance of the <see cref="RabbitMQTriggerAttribute"/> class.
/// </remarks>
/// <param name="queueName">RabbitMQ queue name.</param>
[AttributeUsage(AttributeTargets.Parameter)]
[Binding]
public sealed class RabbitMQTriggerAttribute(string queueName) : Attribute
{
/// <summary>
/// Gets or sets the setting name for RabbitMQ connection URI.
/// </summary>
[ConnectionString]
public string ConnectionStringSetting { get; set; }
/// <summary>
/// Gets the RabbitMQ queue name.
/// </summary>
public string QueueName { get; private set; } = queueName;
/// <summary>
/// Gets or sets a value indicating whether certificate validation should be disabled. Not recommended for
/// production. Does not apply when SSL is disabled.
/// </summary>
public bool DisableCertificateValidation { get; set; }
}