-
Notifications
You must be signed in to change notification settings - Fork 6
/
Attributes.cs
53 lines (46 loc) · 1.66 KB
/
Attributes.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Jsonata.Net.Native.Eval
{
//provides support for cases when
// "undefined inputs always return undefined"
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class PropagateUndefinedAttribute: Attribute
{
}
//provides support for cases when
// "If arg is not specified (i.e. this function is invoked with no arguments), then the context value is used as the value of arg"
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class AllowContextAsValueAttribute : Attribute
{
}
//provides support for cases when
// function expects an array as an argument, but a non-array is passed as argument value, e.g. in map or filter
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class PackSingleValueToSequenceAttribute : Attribute
{
}
//provides support for cases when
// "undefined inputs always return undefined"
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class OptionalArgumentAttribute : Attribute
{
public readonly object? DefaultValue;
public OptionalArgumentAttribute(object? defaultValue)
{
this.DefaultValue = defaultValue;
}
}
//provides support for builtin functions that require EvaluationSupplement
[AttributeUsage(AttributeTargets.Parameter)]
internal sealed class EvalSupplementArgumentAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter)]
internal sealed class VariableNumberArgumentAsArrayAttribute : Attribute
{
}
}