Show / Hide Table of Contents

Class DynamicObjectCollection

Represents a read/write dynamic collection of objects by subject and predicate.

Inheritance
object
DynamicObjectCollection
DynamicObjectCollection<T>
Implements
ICollection<object>
IEnumerable<object>
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 DynamicObjectCollection : ICollection<object>, IEnumerable<object>, IEnumerable, IDynamicMetaObjectProvider

Constructors

| Edit this page View Source

DynamicObjectCollection(DynamicNode, INode)

Initializes a new instance of the DynamicObjectCollection class.

Declaration
public DynamicObjectCollection(DynamicNode subject, INode predicate)
Parameters
Type Name Description
DynamicNode subject

The subject to use.

INode predicate

The predicate to use.

Exceptions
Type Condition
ArgumentNullException

When subject or predicate are null.

Properties

| Edit this page View Source

Count

Gets the number of statements with given subject and predicate.

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

Objects

Gets objects of statements with given subject and predicate.

Declaration
protected IEnumerable<object> Objects { get; }
Property Value
Type Description
IEnumerable<object>
Remarks

Known literal nodes are converted to native primitives, URI and blank nodes are wrapped in DynamicNode.

Methods

| Edit this page View Source

Add(object)

Asserts statements equivalent to given subject and predicate and object.

Declaration
public void Add(object @object)
Parameters
Type Name Description
object object

The object to assert.

| Edit this page View Source

Clear()

Retracts statements with given subject and predicate.

Declaration
public void Clear()
| Edit this page View Source

Contains(object)

Checks whether a statement exists equivalent to given subject and predicate and object.

Declaration
public bool Contains(object @object)
Parameters
Type Name Description
object object

The object to assert.

Returns
Type Description
bool

Whether a statement exists equivalent to given subject and predicate and object.

| Edit this page View Source

CopyTo(object[], int)

Copies objects of statements with given subject and predicate array starting at index.

Declaration
public void CopyTo(object[] array, int index)
Parameters
Type Name Description
object[] array

The destination of subjects copied.

int index

The index at which copying begins.

Remarks

Known literal nodes are converted to native primitives, URI and blank nodes are wrapped in DynamicNode.

| Edit this page View Source

GetEnumerator()

Returns an enumerator that iterates through objects of statements with given subject and predicate.

Declaration
public IEnumerator<object> GetEnumerator()
Returns
Type Description
IEnumerator<object>

An enumerator that iterates through objects of statements with given subject and predicate.

Remarks

Known literal nodes are converted to native primitives, URI and blank nodes are wrapped in DynamicNode.

| Edit this page View Source

Remove(object)

Retracts statements equivalent to given subject and predicate and object.

Declaration
public bool Remove(object @object)
Parameters
Type Name Description
object object

The object to retract.

Returns
Type Description
bool

Whether any statements were retracted.

Implements

ICollection<T>
IEnumerable<T>
IEnumerable
IDynamicMetaObjectProvider

Extension Methods

Extensions.ChunkBy<T>(IEnumerable<T>, int)
Extensions.IsDisjoint<T>(IEnumerable<T>, IEnumerable<T>)
Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • DynamicObjectCollection(DynamicNode, INode)
  • Properties
    • Count
    • IsReadOnly
    • Objects
  • Methods
    • Add(object)
    • Clear()
    • Contains(object)
    • CopyTo(object[], int)
    • GetEnumerator()
    • Remove(object)
  • Implements
  • Extension Methods
Back to top Generated by DocFX