Interface IGraphNode
Inherited Members
Namespace: Cassandra.DataStax.Graph
Assembly: Cassandra.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 |
---|---|
bool |
IsObjectTree
Returns true if the underlying value is an object tree.
Declaration
bool IsObjectTree { get; }
Property Value
Type | Description |
---|---|
bool |
IsScalar
Returns true if the underlying value is a scalar value (string, double, boolean, ...).
Declaration
bool IsScalar { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Get<T>(string)
Gets the typed value of a property of the result.
Declaration
T Get<T>(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|
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 |
---|---|
IDictionary<string, IGraphNode> |
HasProperty(string)
Returns true if the property is defined in this instance.
Declaration
bool HasProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
bool |
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 |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
object |
Exceptions
Type | Condition |
---|---|
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 |
---|---|
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 |
---|---|
bool |
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 |
---|---|
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. |
ToFloat()
Returns the representation of the result as a float.
Declaration
float ToFloat()
Returns
Type | Description |
---|---|
float |
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 |
---|---|
int |
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. |