/
EntityTriggerAttribute.cs
38 lines (36 loc) · 1.28 KB
/
EntityTriggerAttribute.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
37
38
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Diagnostics;
using Microsoft.Azure.WebJobs.Description;
namespace Microsoft.Azure.WebJobs.Extensions.DurableTask
{
/// <summary>
/// Trigger attribute used for durable entity functions.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[DebuggerDisplay("{EntityName} ({Version})")]
#if !FUNCTIONS_V1
#pragma warning disable CS0618 // Type or member is obsolete
[Binding(TriggerHandlesReturnValue = true)]
#pragma warning restore CS0618 // Type or member is obsolete
#else
[Binding]
#endif
public sealed class EntityTriggerAttribute : Attribute
{
/// <summary>
/// Gets or sets the name of the entity.
/// </summary>
/// <remarks>
/// If not specified, the function name is used as the name of the entity.
/// </remarks>
/// <value>
/// The name of the entity or <c>null</c> to use the function name.
/// </value>
#pragma warning disable CS0618 // Type or member is obsolete
[AutoResolve]
#pragma warning restore CS0618 // Type or member is obsolete
public string EntityName { get; set; }
}
}