Class BuiltinArg
- Namespace
- OpaDotNet.Wasm
- Assembly
- OpaDotNet.Wasm.dll
Represents built-in function argument.
public class BuiltinArg
- Inheritance
-
BuiltinArg
- Inherited Members
Properties
Raw
JSON with REGO sets specific patches.
public JsonNode? Raw { get; }
Property Value
RawJson
Raw JSON with REGO sets serialized as arrays.
public JsonNode? RawJson { get; }
Property Value
Methods
AsOrNull<T>(Func<T>?, RegoValueFormat)
Converts built-in function argument in JSON format to the specified type.
public T? AsOrNull<T>(Func<T>? defaultValue = null, RegoValueFormat format = RegoValueFormat.Json)
Parameters
defaultValueFunc<T>Value to return if built-in is null.
formatRegoValueFormatIf
RegoValueFormat.JsonRawJson will be used as source for the conversion. IfRegoValueFormat.ValueRaw will be used as source for the conversion.
Returns
- T
Type Parameters
TTarget type.
As<T>(RegoValueFormat)
Converts built-in function argument in JSON format to the specified type.
public T As<T>(RegoValueFormat format = RegoValueFormat.Json) where T : notnull
Parameters
formatRegoValueFormatValue type JSON.
Returns
- T
Type Parameters
TTarget type.