-
Notifications
You must be signed in to change notification settings - Fork 358
/
IBinder.cs
26 lines (24 loc) · 1.07 KB
/
IBinder.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
// 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 System.Threading;
using System.Threading.Tasks;
namespace Microsoft.Azure.WebJobs
{
/// <summary>
/// Interface defining functionality for dynamically binding to WebJobs SDK attributes
/// at runtime.
/// </summary>
/// <remarks>This interface enables imperative binding with attribute information specified at runtime.</remarks>
public interface IBinder
{
/// <summary>
/// Binds the specified attribute.
/// </summary>
/// <typeparam name="T">The type to bind to.</typeparam>
/// <param name="attribute">The attribute to bind.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <returns>A <see cref="Task"/> that will provide the bound the value.</returns>
Task<T> BindAsync<T>(Attribute attribute, CancellationToken cancellationToken = default(CancellationToken));
}
}