Class ValuedNodeExtensions
Extension Methods related to valued nodes.
Inherited Members
Namespace: VDS.RDF.Nodes
Assembly: dotNetRdf.dll
Syntax
public static class ValuedNodeExtensions
Methods
| Edit this page View SourceAsSafeBoolean(IValuedNode)
Tries to get the result of calling AsBoolean() on a node throwing an error if the node is null.
Declaration
public static bool AsSafeBoolean(this IValuedNode n)
Parameters
Type | Name | Description |
---|---|---|
IValuedNode | n | Node. |
Returns
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
RdfQueryException | Thrown if the input is null of the specific valued node cannot be cast to a boolean. |
AsValuedNode(INode)
Takes a INode and converts it to a IValuedNode if it is not already an instance that implements the interface.
Declaration
public static IValuedNode AsValuedNode(this INode n)
Parameters
Type | Name | Description |
---|---|---|
INode | n | Node. |
Returns
Type | Description |
---|---|
IValuedNode | Valued Node. |