Class DynamicSubjectCollection
Represents a read/write dynamic collection of subjects by predicate and object.
Implements
Inherited Members
Namespace: VDS.RDF.Dynamic
Assembly: dotNetRdf.Dynamic.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 |
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 |
---|---|
int |
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<T><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 |
CopyTo(INode[], int)
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. |
int | index | The index at which copying begins. |
Remarks
Nodes are wrapped in a DynamicNode.
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<T><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.
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. |