Show / Hide Table of Contents

Class DynamicSparqlResult

Provides read/write dictionary and dynamic functionality for SparqlResult.
Inheritance
System.Object
DynamicSparqlResult
Implements
System.Collections.Generic.IDictionary<System.String, System.Object>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.IEnumerable
System.Dynamic.IDynamicMetaObjectProvider
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Dynamic
Assembly: dotNetRDF.dll
Syntax
public class DynamicSparqlResult : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IDynamicMetaObjectProvider

Constructors

| Improve this Doc View Source

DynamicSparqlResult(SparqlResult)

Initializes a new instance of the DynamicSparqlResult class.
Declaration
public DynamicSparqlResult(SparqlResult original)
Parameters
Type Name Description
SparqlResult original The SPARQL result to wrap.
Exceptions
Type Condition
System.ArgumentNullException When original is null.

Properties

| Improve this Doc View Source

Count

Gets the number of variables in the result.
Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IsReadOnly

Gets a value indicating whether this SPARQL result dictionary is read only (always false).
Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Item[String]

Gets or sets values equivalent to bindings in the result.
Declaration
public object this[string variable] { get; set; }
Parameters
Type Name Description
System.String variable
Property Value
Type Description
System.Object The binding converted to a native object.
Exceptions
Type Condition
System.ArgumentNullException When variable is null.
| Improve this Doc View Source

Keys

Gets the variable names in the SPARQL result.
Declaration
public ICollection<string> Keys { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<System.String>
| Improve this Doc View Source

Values

Gets native values equivalent to bindings in the result.
Declaration
public ICollection<object> Values { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<System.Object>

Methods

| Improve this Doc View Source

Add(String, Object)

Binds a variable to a node equivalent to value.
Declaration
public void Add(string variable, object value)
Parameters
Type Name Description
System.String variable The name of the variable to bind.
System.Object value An object that is converted to an equivalent node and bound to the variable.
Exceptions
Type Condition
System.ArgumentNullException When variable is null.
| Improve this Doc View Source

Clear()

Removes all variables in the result.
Declaration
public void Clear()
| Improve this Doc View Source

ContainsKey(String)

Checks whether a variable exists in the result.
Declaration
public bool ContainsKey(string variable)
Parameters
Type Name Description
System.String variable The name of the variable to check.
Returns
Type Description
System.Boolean Whether a variable exists in the result.
| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through pairs of variable names and native values equivalent to bindings in the result.
Declaration
public IEnumerator GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator An enumerator that iterates through pairs of variable names and native values equivalent to bindings in the result.
| Improve this Doc View Source

Remove(String)

Unbinds a variable from the result.
Declaration
public bool Remove(string variable)
Parameters
Type Name Description
System.String variable The variable to unbind.
Returns
Type Description
System.Boolean Whether a variable was removed.
| Improve this Doc View Source

TryGetValue(String, out Object)

Tries to get a native value equivalent to a binding from the result.
Declaration
public bool TryGetValue(string variable, out object value)
Parameters
Type Name Description
System.String variable The name of the variable to try.
System.Object value A native value equivalent to the binding.
Returns
Type Description
System.Boolean Whether value was set.

Explicit Interface Implementations

| Improve this Doc View Source

ICollection<KeyValuePair<String, Object>>.Add(KeyValuePair<String, Object>)

Declaration
void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, System.Object> item
| Improve this Doc View Source

ICollection<KeyValuePair<String, Object>>.Contains(KeyValuePair<String, Object>)

Declaration
bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, System.Object> item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ICollection<KeyValuePair<String, Object>>.CopyTo(KeyValuePair<String, Object>[], Int32)

Declaration
void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, System.Object>[] array
System.Int32 arrayIndex
| Improve this Doc View Source

ICollection<KeyValuePair<String, Object>>.Remove(KeyValuePair<String, Object>)

Declaration
bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.String, System.Object> item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IEnumerable<KeyValuePair<String, Object>>.GetEnumerator()

Declaration
IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
| Improve this Doc View Source

IDynamicMetaObjectProvider.GetMetaObject(Expression)

Declaration
DynamicMetaObject IDynamicMetaObjectProvider.GetMetaObject(Expression parameter)
Parameters
Type Name Description
System.Linq.Expressions.Expression parameter
Returns
Type Description
System.Dynamic.DynamicMetaObject

Implements

System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Dynamic.IDynamicMetaObjectProvider

Extension Methods

Extensions.AsEnumerable<T>(T)
Extensions.IsDisjoint<T>(IEnumerable<T>, IEnumerable<T>)
Extensions.ChunkBy<T>(IEnumerable<T>, Int32)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • DynamicSparqlResult(SparqlResult)
  • Properties
    • Count
    • IsReadOnly
    • Item[String]
    • Keys
    • Values
  • Methods
    • Add(String, Object)
    • Clear()
    • ContainsKey(String)
    • GetEnumerator()
    • Remove(String)
    • TryGetValue(String, out Object)
  • Explicit Interface Implementations
    • ICollection<KeyValuePair<String, Object>>.Add(KeyValuePair<String, Object>)
    • ICollection<KeyValuePair<String, Object>>.Contains(KeyValuePair<String, Object>)
    • ICollection<KeyValuePair<String, Object>>.CopyTo(KeyValuePair<String, Object>[], Int32)
    • ICollection<KeyValuePair<String, Object>>.Remove(KeyValuePair<String, Object>)
    • IEnumerable<KeyValuePair<String, Object>>.GetEnumerator()
    • IDynamicMetaObjectProvider.GetMetaObject(Expression)
  • Implements
  • Extension Methods
Back to top Generated by DocFX