-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSemverComparison.cs
35 lines (31 loc) · 1.39 KB
/
SemverComparison.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
using System;
namespace Chasm.SemanticVersioning
{
/// <summary>
/// <para>Defines semantic version comparison rules to be used by <see cref="SemverComparer.FromComparison"/>.</para>
/// </summary>
[Flags]
public enum SemverComparison : byte
{
/// <summary>
/// <para>Default SemVer 2.0.0 comparison, that ignores the build metadata, and, when comparing partial versions, considers wildcard characters and omitted components equal.</para>
/// </summary>
Default = 0,
/// <summary>
/// <para>Compare semantic versions with build metadata included in the comparison.</para>
/// </summary>
IncludeBuild = 1 << 0,
/// <summary>
/// <para>Compare partial versions, differentiating between different wildcard characters and omitted components.</para>
/// </summary>
DiffWildcards = 1 << 1,
/// <summary>
/// <para>Compare primitive and X-Range comparators, differentiating between implicit and explicit equality operators.</para>
/// </summary>
DiffEquality = 1 << 2,
/// <summary>
/// <para>Compare semantic versions, and <c>node-semver</c> objects exactly: including build metadata, and differentiating wildcards and equality operators.</para>
/// </summary>
Exact = IncludeBuild | DiffWildcards | DiffEquality,
}
}