Class DynamicSubjectCollection
Represents a read/write dynamic collection of subjects by predicate and object.
Implements
System.Collections.Generic.ICollection<INode>
System.Collections.Generic.IEnumerable<INode>
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 DynamicSubjectCollection : ICollection<INode>, IEnumerable<INode>, IEnumerable, IDynamicMetaObjectProvider
Constructors
| Improve this Doc View SourceDynamicSubjectCollection(INode, DynamicNode)
Initializes a new instance of the DynamicSubjectCollection class.
Declaration
public DynamicSubjectCollection(INode predicate, DynamicNode object)
Parameters
Type | Name | Description |
---|---|---|
INode | predicate | The predicate to use. |
DynamicNode | object | The object to use. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | When predicate or object are null. |
Properties
| Improve this Doc View SourceCount
Gets the number of statements with given predicate and object.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsReadOnly
Gets a value indicating whether this collection is read only (always false).
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Subjects
Gets subjects of statements with given predicate and object.
Declaration
protected IEnumerable<INode> Subjects { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<INode> |
Remarks
Nodes are wrapped in a DynamicNode.
Methods
| Improve this Doc View SourceAdd(INode)
Asserts a statement with
subject
and given predicate and object.
Declaration
public void Add(INode subject)
Parameters
Type | Name | Description |
---|---|---|
INode | subject | The subject to assert. |
Clear()
Retracts statements with given predicate and object.
Declaration
public void Clear()
Contains(INode)
Checks whether a statement exists with
subject
and given predicate and object.
Declaration
public bool Contains(INode subject)
Parameters
Type | Name | Description |
---|---|---|
INode | subject | The subject to check. |
Returns
Type | Description |
---|---|
System.Boolean | Whether a statement exists with subject and given predicate and object. |
CopyTo(INode[], Int32)
Copies subjects of statements with given predicate and object to
array
starting at index
.
Declaration
public void CopyTo(INode[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
INode[] | array | The destination of subjects copied. |
System.Int32 | index | The index at which copying begins. |
Remarks
Nodes are wrapped in a DynamicNode.
|
Improve this Doc
View Source
GetEnumerator()
Returns an enumerator that iterates through subjects of statements with given predicate and object.
Declaration
public IEnumerator<INode> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<INode> | An enumerator that can be used to iterate through subjects of statements with given predicate and object. |
Remarks
Nodes are wrapped in a DynamicNode.
|
Improve this Doc
View Source
Remove(INode)
Retracts statements with
subject
and given predicate and object.
Declaration
public bool Remove(INode subject)
Parameters
Type | Name | Description |
---|---|---|
INode | subject | The subject to retract. |
Returns
Type | Description |
---|---|
System.Boolean | Whether any statements were retracted. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
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.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Dynamic.IDynamicMetaObjectProvider