-
Notifications
You must be signed in to change notification settings - Fork 147
/
KnownResolverKind.cs
69 lines (55 loc) · 2.28 KB
/
KnownResolverKind.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.ContractsLight;
namespace BuildXL.FrontEnd.Workspaces.Core
{
/// <summary>
/// Known resolver kinds.
/// </summary>
public static class KnownResolverKind
{
/// <nodoc/>
public const string SourceResolverKind = "SourceResolver";
/// <nodoc/>
public const string DScriptResolverKind = "DScript";
/// <nodoc/>
public const string NugetResolverKind = "Nuget";
/// <nodoc/>
public const string DownloadResolverKind = "Download";
/// <nodoc/>
public const string MsBuildResolverKind = "MsBuild";
/// <nodoc/>
public const string RushResolverKind = "Rush";
/// <nodoc/>
public const string YarnResolverKind = "Yarn";
/// <nodoc/>
public const string CustomJavaScriptResolverKind = "CustomJavaScript";
/// <nodoc/>
public const string LageResolverKind = "Lage";
/// <nodoc/>
public const string NinjaResolverKind = "Ninja";
/// <nodoc />
public static readonly string DefaultSourceResolverKind = "DefaultSourceResolver";
/// <nodoc />
public static string[] KnownResolvers { get; } =
{SourceResolverKind, DScriptResolverKind, NugetResolverKind, DefaultSourceResolverKind, DownloadResolverKind, MsBuildResolverKind, NinjaResolverKind, YarnResolverKind, LageResolverKind, CustomJavaScriptResolverKind};
/// <summary>
/// Returns whether a given string is a valid resolver kind.
/// </summary>
public static bool IsValid(string value)
{
return
value == DefaultSourceResolverKind ||
value == SourceResolverKind ||
value == DScriptResolverKind ||
value == NugetResolverKind ||
value == DownloadResolverKind ||
value == MsBuildResolverKind ||
value == NinjaResolverKind ||
value == RushResolverKind ||
value == YarnResolverKind ||
value == LageResolverKind ||
value == CustomJavaScriptResolverKind;
}
}
}