-
Notifications
You must be signed in to change notification settings - Fork 369
/
IBindSymbolSource.cs
36 lines (32 loc) · 1.45 KB
/
IBindSymbolSource.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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.TemplateEngine.Abstractions.Components
{
/// <summary>
/// The component provides values which may be bound to "bind" symbol.
/// The priority order is determined by <see cref="IPrioritizedComponent.Priority"/>.
/// </summary>
public interface IBindSymbolSource : IPrioritizedComponent
{
/// <summary>
/// The user friendly name of the component.
/// </summary>
public string DisplayName { get; }
/// <summary>
/// Prefix that is used in binding to reference the component.
/// </summary>
public string? SourcePrefix { get; }
/// <summary>
/// If set to true, the component required exact prefix match to be used.
/// </summary>
public bool RequiresPrefixMatch { get; }
/// <summary>
/// Gets the value corresponding to <paramref name="bindName"/>.
/// </summary>
/// <param name="settings">template engine environment settings.</param>
/// <param name="bindName">the value to retrieve (without prefix).</param>
/// <param name="cancellationToken">cancellation token.</param>
/// <returns></returns>
public Task<string?> GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindName, CancellationToken cancellationToken);
}
}