Show / Hide Table of Contents

Class LLBLGenCache

The context cache for LLBLGen.

Inheritance
System.Object
SD.LLBLGen.Pro.ORMSupportClasses.Context
LLBLGenCache
Implements
IDataContextCache
System.Collections.Generic.IDictionary<System.Object, IEntityEntry>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry>>
System.Collections.IEnumerable
Inherited Members
SD.LLBLGen.Pro.ORMSupportClasses.Context.Clear()
SD.LLBLGen.Pro.ORMSupportClasses.Context.Add(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCore)
SD.LLBLGen.Pro.ORMSupportClasses.Context.Add(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollectionCore)
SD.LLBLGen.Pro.ORMSupportClasses.Context.EntitySaveCommitted<TEntity>(TEntity)
SD.LLBLGen.Pro.ORMSupportClasses.Context.GetAll(System.Type)
SD.LLBLGen.Pro.ORMSupportClasses.Context.GetAllTypes()
SD.LLBLGen.Pro.ORMSupportClasses.Context.Get(SD.LLBLGen.Pro.ORMSupportClasses.IEntity)
SD.LLBLGen.Pro.ORMSupportClasses.Context.Get(SD.LLBLGen.Pro.ORMSupportClasses.IEntity2)
SD.LLBLGen.Pro.ORMSupportClasses.Context.Get(SD.LLBLGen.Pro.ORMSupportClasses.IEntityFactory, System.Object[])
SD.LLBLGen.Pro.ORMSupportClasses.Context.Get(SD.LLBLGen.Pro.ORMSupportClasses.IEntityFactory2, System.Object[])
SD.LLBLGen.Pro.ORMSupportClasses.Context.Remove(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCore)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnAddCollectionComplete(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnAddCollection(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnAddCollectionComplete(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection2)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnAddCollection(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCollection2)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnClear()
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnAdd<TEntity>(TEntity)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnRemove(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCore)
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnInitComplete()
SD.LLBLGen.Pro.ORMSupportClasses.Context.SetExistingEntityFieldsInGet
SD.LLBLGen.Pro.ORMSupportClasses.Context.ObjectIDToEntityInstance
SD.LLBLGen.Pro.ORMSupportClasses.Context.EntityTypeHashtables
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.LLBLGen
Assembly: Kephas.Data.LLBLGen.dll
Syntax
public class LLBLGenCache : Context, IDataContextCache, IDictionary<object, IEntityEntry>, ICollection<KeyValuePair<object, IEntityEntry>>, IEnumerable<KeyValuePair<object, IEntityEntry>>, IEnumerable

Constructors

| Improve this Doc View Source

LLBLGenCache()

Initializes a new instance of the LLBLGenCache class.

Declaration
public LLBLGenCache()
| Improve this Doc View Source

LLBLGenCache(IDictionary<Object, IEntityEntry>, IDictionary<Guid, IEntityEntry>)

Initializes a new instance of the LLBLGenCache class.

Declaration
protected LLBLGenCache(IDictionary<object, IEntityEntry> items, IDictionary<Guid, IEntityEntry> entityEntryMappings)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.Object, IEntityEntry> items

The items.

System.Collections.Generic.IDictionary<System.Guid, IEntityEntry> entityEntryMappings

The entity information mappings.

Properties

| Improve this Doc View Source

Count

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

| Improve this Doc View Source

EntityInfoFactory

Gets or sets the entity information factory.

Declaration
protected Func<object, IEntityEntry> EntityInfoFactory { get; set; }
Property Value
Type Description
System.Func<System.Object, IEntityEntry>
| Improve this Doc View Source

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.

| Improve this Doc View Source

Item[Object]

Gets or sets the element with the specified key.

Declaration
public IEntityEntry this[object key] { get; set; }
Parameters
Type Name Description
System.Object key

The key of the element to get or set.

Property Value
Type Description
IEntityEntry

The element with the specified key.

| Improve this Doc View Source

Keys

Gets an System.Collections.Generic.ICollection<T> containing the keys of the System.Collections.Generic.IDictionary<TKey, TValue>.

Declaration
public ICollection<object> Keys { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<System.Object>

An System.Collections.Generic.ICollection<T> containing the keys of the object that implements System.Collections.Generic.IDictionary<TKey, TValue>.

| Improve this Doc View Source

NewEntities

The new entities.

Declaration
protected Dictionary<Guid, IEntityCore> NewEntities { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.Guid, SD.LLBLGen.Pro.ORMSupportClasses.IEntityCore>
| Improve this Doc View Source

Values

Gets an System.Collections.Generic.ICollection<T> containing the values in the System.Collections.Generic.IDictionary<TKey, TValue>.

Declaration
public ICollection<IEntityEntry> Values { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<IEntityEntry>

An System.Collections.Generic.ICollection<T> containing the values in the object that implements System.Collections.Generic.IDictionary<TKey, TValue>.

Methods

| Improve this Doc View Source

Add(IEntityEntry)

Adds an IEntityEntry to the IDataContextCache.

Declaration
public void Add(IEntityEntry value)
Parameters
Type Name Description
IEntityEntry value

The object to add.

| Improve this Doc View Source

AddCore(IEntityEntry)

Adds an entity info to the internal dictionaries.

Declaration
protected virtual void AddCore(IEntityEntry value)
Parameters
Type Name Description
IEntityEntry value

The object to use as the value of the element to add.

| Improve this Doc View Source

ContainsKey(Object)

Determines whether the System.Collections.Generic.IDictionary<TKey, TValue> contains an element with the specified key.

Declaration
public bool ContainsKey(object key)
Parameters
Type Name Description
System.Object key

The key to locate in the System.Collections.Generic.IDictionary<TKey, TValue>.

Returns
Type Description
System.Boolean

true if the System.Collections.Generic.IDictionary<TKey, TValue> contains an element with the key; otherwise, false.

| Improve this Doc View Source

CopyTo(KeyValuePair<Object, IEntityEntry>[], Int32)

Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.

Declaration
public virtual void CopyTo(KeyValuePair<object, IEntityEntry>[] array, int arrayIndex)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry>[] 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 array at which copying begins.

| Improve this Doc View Source

CreateEntityInfo(Object)

Creates entity information.

Declaration
protected virtual IEntityEntry CreateEntityInfo(object entity)
Parameters
Type Name Description
System.Object entity

The entity.

Returns
Type Description
IEntityEntry

The new entity information.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the requested operation is invalid.

| Improve this Doc View Source

GetEntityEntry(Object)

Gets the entity information associated to the provided entity, or null if none could be found.

Declaration
public virtual IEntityEntry GetEntityEntry(object entity)
Parameters
Type Name Description
System.Object entity

The entity.

Returns
Type Description
IEntityEntry

The entity information or null.

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<object, IEntityEntry>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry>>

An enumerator that can be used to iterate through the collection.

| Improve this Doc View Source

OnAddComplete<TEntity>(TEntity)

Called at the end of Add(TEntity).

Declaration
protected override void OnAddComplete<TEntity>(TEntity toAdd)

    where TEntity : class, IEntityCore
Parameters
Type Name Description
TEntity toAdd

To add.

Type Parameters
Name Description
TEntity

The type of the entity.

Overrides
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnAddComplete<TEntity>(TEntity)
| Improve this Doc View Source

OnClearComplete()

Called at the end of the Clear() method.

Declaration
protected override void OnClearComplete()
Overrides
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnClearComplete()
| Improve this Doc View Source

OnRemoveComplete(IEntityCore)

Called at the end of Remove(IEntityCore), when toRemove has been removed from this context.

Declaration
protected override void OnRemoveComplete(IEntityCore toRemove)
Parameters
Type Name Description
SD.LLBLGen.Pro.ORMSupportClasses.IEntityCore toRemove

To remove.

Overrides
SD.LLBLGen.Pro.ORMSupportClasses.Context.OnRemoveComplete(SD.LLBLGen.Pro.ORMSupportClasses.IEntityCore)
| Improve this Doc View Source

Remove(IEntityEntry)

Removes an IEntityEntry from the IDataContextCache.

Declaration
public bool Remove(IEntityEntry value)
Parameters
Type Name Description
IEntityEntry value

The object to remove.

Returns
Type Description
System.Boolean

true if the removal succeeds, false otherwise.

| Improve this Doc View Source

Remove(Object)

Removes the element with the specified key from the System.Collections.Generic.IDictionary<TKey, TValue>.

Declaration
public virtual bool Remove(object key)
Parameters
Type Name Description
System.Object key

The key of the element to remove.

Returns
Type Description
System.Boolean

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original System.Collections.Generic.IDictionary<TKey, TValue>.

| Improve this Doc View Source

RemoveCore(IEntityEntry)

Removes the entity info from the internal dictionaries.

Declaration
protected virtual bool RemoveCore(IEntityEntry value)
Parameters
Type Name Description
IEntityEntry value

The object to remove.

Returns
Type Description
System.Boolean

True if it succeeds, false if it fails.

| Improve this Doc View Source

TryGetValue(Object, out IEntityEntry)

Gets the value associated with the specified key.

Declaration
public virtual bool TryGetValue(object key, out IEntityEntry value)
Parameters
Type Name Description
System.Object key

The key whose value to get.

IEntityEntry value

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns
Type Description
System.Boolean

true if the object that implements System.Collections.Generic.IDictionary<TKey, TValue> contains an element with the specified key; otherwise, false.

Explicit Interface Implementations

| Improve this Doc View Source

ICollection<KeyValuePair<Object, IEntityEntry>>.Add(KeyValuePair<Object, IEntityEntry>)

Adds an item to the System.Collections.Generic.ICollection<T>.

Declaration
void ICollection<KeyValuePair<object, IEntityEntry>>.Add(KeyValuePair<object, IEntityEntry> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry> item

The object to add to the System.Collections.Generic.ICollection<T>.

| Improve this Doc View Source

ICollection<KeyValuePair<Object, IEntityEntry>>.Contains(KeyValuePair<Object, IEntityEntry>)

Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.

Declaration
bool ICollection<KeyValuePair<object, IEntityEntry>>.Contains(KeyValuePair<object, IEntityEntry> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry> item

The object to locate in the System.Collections.Generic.ICollection<T>.

Returns
Type Description
System.Boolean

true if item is found in the System.Collections.Generic.ICollection<T>; otherwise, false.

| Improve this Doc View Source

ICollection<KeyValuePair<Object, IEntityEntry>>.Remove(KeyValuePair<Object, IEntityEntry>)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<T>.

Declaration
bool ICollection<KeyValuePair<object, IEntityEntry>>.Remove(KeyValuePair<object, IEntityEntry> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<System.Object, IEntityEntry> item

The object to remove from the System.Collections.Generic.ICollection<T>.

Returns
Type Description
System.Boolean

true if item was successfully removed from the System.Collections.Generic.ICollection<T>; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection<T>.

| Improve this Doc View Source

IDictionary<Object, IEntityEntry>.Add(Object, IEntityEntry)

Adds an element with the provided key and value to the System.Collections.Generic.IDictionary<TKey, TValue>.

Declaration
void IDictionary<object, IEntityEntry>.Add(object key, IEntityEntry value)
Parameters
Type Name Description
System.Object key

The object to use as the key of the element to add.

IEntityEntry value

The object to use as the value of the element to add.

Exceptions
Type Condition
System.ArgumentNullException

key is null.

System.ArgumentException

An element with the same key already exists in the System.Collections.Generic.IDictionary<TKey, TValue>.

System.NotSupportedException

The System.Collections.Generic.IDictionary<TKey, TValue> is read-only.

| Improve this Doc View Source

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.

Implements

IDataContextCache
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX