Class MemoryStore
A simple in-memory "Store" implementation for experimentation and testing.
Inheritance
System.Object
MemoryStore
Inherited Members
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()
Assembly: Ease.Repository.dll
Syntax
public class MemoryStore : IStoreBatchWriter, IStoreWriter
Methods
|
Improve this Doc
View Source
Add<TEntity>(TEntity)
Declaration
public void Add<TEntity>(TEntity entity)
where TEntity : class, new()
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
Type Parameters
|
Improve this Doc
View Source
Add<TEntity>(IEnumerable<TEntity>)
Declaration
public void Add<TEntity>(IEnumerable<TEntity> entities)
where TEntity : class, new()
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<TEntity> |
entities |
|
Type Parameters
|
Improve this Doc
View Source
Delete<TEntity>(TEntity)
Declaration
public void Delete<TEntity>(TEntity entity)
where TEntity : class, new()
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
Type Parameters
|
Improve this Doc
View Source
Delete<TEntity>(IEnumerable<TEntity>)
Declaration
public void Delete<TEntity>(IEnumerable<TEntity> entities)
where TEntity : class, new()
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<TEntity> |
entities |
|
Type Parameters
|
Improve this Doc
View Source
Entities<TEntity>()
Returns the managed set of entities of the specified Type.
Declaration
public HashSet<TEntity> Entities<TEntity>()
Returns
| Type |
Description |
| System.Collections.Generic.HashSet<TEntity> |
The managed set of entities
|
Type Parameters
| Name |
Description |
| TEntity |
The entity Type
|
|
Improve this Doc
View Source
Register<TEntity>(IEqualityComparer<TEntity>)
Register an entity Type with an appropriate entityKeyComparer (needed to detect if
entity is already present)
Declaration
public HashSet<TEntity> Register<TEntity>(IEqualityComparer<TEntity> entityKeyComparer)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEqualityComparer<TEntity> |
entityKeyComparer |
Use to compare the key portion of the entity, ignoring the rest of non-key
properties
|
Returns
| Type |
Description |
| System.Collections.Generic.HashSet<TEntity> |
|
Type Parameters
|
Improve this Doc
View Source
Update<TEntity>(TEntity)
Declaration
public void Update<TEntity>(TEntity entity)
where TEntity : class, new()
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
Type Parameters
|
Improve this Doc
View Source
Update<TEntity>(IEnumerable<TEntity>)
Declaration
public void Update<TEntity>(IEnumerable<TEntity> entities)
where TEntity : class, new()
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<TEntity> |
entities |
|
Type Parameters
Implements
Extension Methods