Class LLBLGenCollectionAdapter<TEntityImplementation, TEntity>
A collection adapter mapping a collection of entity abstractions onto LLBLGen collections of entity implementations.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Data.LLBLGen
Assembly: Kephas.Data.LLBLGen.dll
Syntax
public class LLBLGenCollectionAdapter<TEntityImplementation, TEntity> : ICollection<TEntity>, IEnumerable<TEntity>, IEnumerable where TEntityImplementation : TEntity
Type Parameters
Name | Description |
---|---|
TEntityImplementation | Type of the entity implementation. |
TEntity | Type of the entity. |
Constructors
| Improve this Doc View SourceLLBLGenCollectionAdapter(IEntityEntryAware, ICollection<TEntityImplementation>, IRelationPredicateBucket)
Initializes a new instance of the LLBLGenCollectionAdapter<TEntityImplementation, TEntity> class.
Declaration
public LLBLGenCollectionAdapter(IEntityEntryAware entity, ICollection<TEntityImplementation> collectionImplementation, IRelationPredicateBucket relation)
Parameters
Type | Name | Description |
---|---|---|
IEntityEntryAware | entity | The containing entity. |
System.Collections.Generic.ICollection<TEntityImplementation> | collectionImplementation | The collection implementation. |
SD.LLBLGen.Pro.ORMSupportClasses.IRelationPredicateBucket | relation | The relation. |
Properties
| Improve this Doc View SourceCount
Gets the number of elements contained in the System.Collections.Generic.ICollection<T>.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of elements contained in the System.Collections.Generic.ICollection<T>. |
IsReadOnly
Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the System.Collections.Generic.ICollection<T> is read-only; otherwise, false. |
Methods
| Improve this Doc View SourceAdd(TEntity)
Adds an item to the System.Collections.Generic.ICollection<T>.
Declaration
public void Add(TEntity item)
Parameters
Type | Name | Description |
---|---|---|
TEntity | item | The object to add to the System.Collections.Generic.ICollection<T>. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The System.Collections.Generic.ICollection<T> is read-only. |
Clear()
Removes all items from the System.Collections.Generic.ICollection<T>.
Declaration
public void Clear()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The System.Collections.Generic.ICollection<T> is read-only. |
Contains(TEntity)
Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.
Declaration
public bool Contains(TEntity item)
Parameters
Type | Name | Description |
---|---|---|
TEntity | item | The object to locate in the System.Collections.Generic.ICollection<T>. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<TEntity> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<TEntity> | An enumerator that can be used to iterate through the collection. |
Remove(TEntity)
Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<T>.
Declaration
public bool Remove(TEntity item)
Parameters
Type | Name | Description |
---|---|---|
TEntity | item | The object to remove from the System.Collections.Generic.ICollection<T>. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The System.Collections.Generic.ICollection<T> is read-only. |
Explicit Interface Implementations
| Improve this Doc View SourceICollection<TEntity>.CopyTo(TEntity[], Int32)
Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.
Declaration
void ICollection<TEntity>.CopyTo(TEntity[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
TEntity[] | array | The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<T>. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.ArgumentException | The number of elements in the source System.Collections.Generic.ICollection<T> is greater than the available space from |
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |