Table of Contents

Class Output

Namespace
Rego
Assembly
Rego.dll
public class Output
Inheritance
Output
Inherited Members

Properties

Count

The number of results in the output.

public int Count { get; }

Property Value

int

Handle

The underlying Rego output handle.

public RegoOutputHandle Handle { get; }

Property Value

RegoOutputHandle

Node

The root node of the output.

public Node Node { get; }

Property Value

Node

Ok

Indicates whether the output is valid.

public bool Ok { get; }

Property Value

bool

Methods

Binding(int, string)

Returns the binding with the specified name at the specified index. If the index is out of range, an ArgumentOutOfRangeException is thrown. If the name does not exist, an empty node is returned.

public Node Binding(int index, string name)

Parameters

index int

Index into the result set

name string

Name of the binding

Returns

Node

The binding node, or an empty node if not found

Exceptions

ArgumentOutOfRangeException

Binding(string)

Returns the binding with the specified name at index 0. If the name does not exist, an empty node is returned.

public Node Binding(string name)

Parameters

name string

Name of the binding

Returns

Node

The binding node, or an empty node if not found

Expressions()

Returns the expressions at index 0. If there are no expressions, an empty node is returned.

public Node Expressions()

Returns

Node

The expressions node, or an empty node if not found

Expressions(int)

Returns the expressions at the specified index. If the index is out of range, an ArgumentOutOfRangeException is thrown. The expressions are returned as a node. If there are no expressions, an empty node is returned.

public Node Expressions(int index)

Parameters

index int

The index into the result set

Returns

Node

The expressions node, or an empty node if not found

Exceptions

ArgumentOutOfRangeException

ToString()

Returns a JSON representation of the output.

public override string ToString()

Returns

string

The JSON string representation of the output

Exceptions

RegoException