Show / Hide Table of Contents

Class DynamicSubjectCollection

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

Inheritance
object
DynamicSubjectCollection
DynamicSubjectCollection<T>
Implements
ICollection<INode>
IEnumerable<INode>
IEnumerable
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

| Edit this page 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
ArgumentNullException

When predicate or object are null.

Properties

| Edit this page View Source

Count

Gets the number of statements with given predicate and object.

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

IsReadOnly

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

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
bool
| Edit this page View Source

Subjects

Gets subjects of statements with given predicate and object.

Declaration
protected IEnumerable<INode> Subjects { get; }
Property Value
Type Description
IEnumerable<INode>
Remarks

Nodes are wrapped in a DynamicNode.

Methods

| Edit this page 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.

| Edit this page View Source

Clear()

Retracts statements with given predicate and object.

Declaration
public void Clear()
| Edit this page 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
bool

Whether a statement exists with subject and given predicate and object.

| Edit this page 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.

| Edit this page 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
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.

| Edit this page 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
bool

Whether any statements were retracted.

Implements

ICollection<T>
IEnumerable<T>
IEnumerable
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)
  • Edit this page
  • 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