Interface IGraphNode
Inherited Members
Namespace: Dse.Graph
Assembly: Dse.dll
Syntax
public interface IGraphNode : IEquatable<IGraphNode>
Properties
IsArray
Returns true if the underlying value is an array.
Declaration
bool IsArray { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsObjectTree
Returns true if the underlying value is an object tree.
Declaration
bool IsObjectTree { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsScalar
Returns true if the underlying value is a scalar value (string, double, boolean, ...).
Declaration
bool IsScalar { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Get<T>(String)
Gets the typed value of a property of the result.
Declaration
T Get<T>(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Name of the property. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | Type of the property. Use dynamic for object trees. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Throws NotSupportedException when the target type is not supported |
GetProperties()
Gets the a dictionary of properties of this node.
Declaration
IDictionary<string, IGraphNode> GetProperties()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, IGraphNode> |
HasProperty(String)
Returns true if the property is defined in this instance.
Declaration
bool HasProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | When the underlying value is not an object tree |
To(Type)
Returns the representation of the GraphNode as an instance of the type provided.
Declaration
object To(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
System.Object |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Throws NotSupportedException when the target type is not supported |
To<T>()
Returns the representation of the GraphNode as an instance of type T.
Declaration
T To<T>()
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The type to which the current instance is going to be converted to. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Throws NotSupportedException when the target type is not supported |
ToBoolean()
Returns the representation of the result as a boolean.
Declaration
bool ToBoolean()
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | It throws an InvalidOperationException when the internal value is not an scalar. |
System.InvalidCastException | When the scalar value is not convertible to target type. |
ToDouble()
Returns the representation of the result as a double.
Declaration
double ToDouble()
Returns
Type | Description |
---|---|
System.Double |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | It throws an InvalidOperationException when the internal value is not an scalar. |
System.InvalidCastException | When the scalar value is not convertible to target type. |
ToIArray()
Converts the instance into an array when the internal representation is a json array.
Declaration
IGraphNode[] ToIArray()
Returns
Type | Description |
---|---|
IGraphNode[] |
ToInt32()
Returns the representation of the result as an int.
Declaration
int ToInt32()
Returns
Type | Description |
---|---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | It throws an InvalidOperationException when the internal value is not an scalar. |
System.InvalidCastException | When the scalar value is not convertible to target type. |