Show / Hide Table of Contents

Class DynamicSubjectCollection

Represents a read/write dynamic collection of subjects by predicate and object.

Inheritance
System.Object
DynamicSubjectCollection
DynamicSubjectCollection<T>
Implements
System.Collections.Generic.ICollection<T><INode>
System.Collections.Generic.IEnumerable<T><INode>
System.Collections.IEnumerable
System.Dynamic.IDynamicMetaObjectProvider
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Dynamic
Assembly: dotNetRdf.Dynamic.dll
Syntax
public class DynamicSubjectCollection : ICollection<INode>, IEnumerable<INode>, IEnumerable, IDynamicMetaObjectProvider

Constructors

| Improve this Doc View Source

DynamicSubjectCollection(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 Source

Count

Gets the number of statements with given predicate and object.

Declaration
public int Count { get; }
Property Value
Type Description
int
| Improve this Doc View Source

IsReadOnly

Gets a value indicating whether this collection is read only (always false).

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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 Source

Add(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.

| Improve this Doc View Source

Clear()

Retracts statements with given predicate and object.

Declaration
public void Clear()
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| 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<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.

| 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.

Implements

System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Dynamic.IDynamicMetaObjectProvider

Extension Methods

Extensions.BlankNodes(IEnumerable<INode>)
Extensions.ChunkBy<T>(IEnumerable<T>, int)
Extensions.GraphLiteralNodes(IEnumerable<INode>)
Extensions.IsDisjoint<T>(IEnumerable<T>, IEnumerable<T>)
Extensions.LiteralNodes(IEnumerable<INode>)
Extensions.UriNodes(IEnumerable<INode>)
Extensions.VariableNodes(IEnumerable<INode>)
Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • DynamicSubjectCollection(INode, DynamicNode)
  • Properties
    • Count
    • IsReadOnly
    • Subjects
  • Methods
    • Add(INode)
    • Clear()
    • Contains(INode)
    • CopyTo(INode[], int)
    • GetEnumerator()
    • Remove(INode)
  • Implements
  • Extension Methods
Back to top Generated by DocFX