Repository navigation
Expand file tree
/
Copy pathExperiments.cs
More file actions
45 lines (43 loc) · 1.58 KB
/
Copy pathExperiments.cs
File metadata and controls
45 lines (43 loc) · 1.58 KB
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
namespace NRedisStack
{
// [Experimental(Experiments.SomeFeature, UrlFormat = Experiments.UrlFormat)]
// where SomeFeature has the next label, for example "NRS042", and /docs/exp/NRS042.md exists.
//
// Retired diagnostic ids (features graduated out of [Experimental]; the /docs/exp/ entries are kept
// for history). Do not reuse these ids:
// NRS001 - Redis 8.4 hybrid search
// NRS002 - Redis 8.8 multi-aggregate time-series
internal static class Experiments
{
public const string SearchCollect = "NRS003";
// {0} is substituted with the diagnostic id, e.g. NRS042 -> https://redis.github.io/NRedisStack/exp/NRS042
public const string UrlFormat = "https://redis.github.io/NRedisStack/exp/{0}";
}
}
#if !NET8_0_OR_GREATER
#pragma warning disable SA1403
namespace System.Diagnostics.CodeAnalysis
#pragma warning restore SA1403
{
[AttributeUsage(
AttributeTargets.Assembly |
AttributeTargets.Module |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Enum |
AttributeTargets.Constructor |
AttributeTargets.Method |
AttributeTargets.Property |
AttributeTargets.Field |
AttributeTargets.Event |
AttributeTargets.Interface |
AttributeTargets.Delegate,
Inherited = false)]
internal sealed class ExperimentalAttribute(string diagnosticId) : Attribute
{
public string DiagnosticId { get; } = diagnosticId;
public string? UrlFormat { get; set; }
public string? Message { get; set; }
}
}
#endif