Provides basic extensions for using a mocked store against any object, levering off of PeanutButter's metadata logic.
More...
|
static IDictionary< int, TEntity > | FindOrAddMockStoreFor< TEntity > (this object owner) |
| Finds or creates a validating store with integer primary key and TEntity entries (ie IDictionary<int, TEntity>, but not allowing invalid PK values (ie ids must be > 0)). The store is associated with the owning object for future use.
|
static TStore | FindOrAddMockStore< TStore > (this object owner) |
| Finds or creates a store of the given type TStore, associated with the owner object. TStore must be a type which has a parameterless constructor.
|
static TResult | FindOrAddMockStore< TResult > (this object owner, Func< TResult > factory) |
| Finds or creates a store of the given type TStore, associated with the owner object. If the store doesn't already exist, it is created with the provided factory.
|
Provides basic extensions for using a mocked store against any object, levering off of PeanutButter's metadata logic.
◆ FindOrAddMockStore< TResult >()
TResult PeanutButter.Utils.MockStoreExtensions.FindOrAddMockStore< TResult > |
( |
this object | owner, |
|
|
Func< TResult > | factory ) |
|
static |
Finds or creates a store of the given type TStore, associated with the owner object. If the store doesn't already exist, it is created with the provided factory.
- Parameters
-
- Template Parameters
-
- Returns
◆ FindOrAddMockStore< TStore >()
TStore PeanutButter.Utils.MockStoreExtensions.FindOrAddMockStore< TStore > |
( |
this object | owner | ) |
|
|
static |
Finds or creates a store of the given type TStore, associated with the owner object. TStore must be a type which has a parameterless constructor.
- Parameters
-
- Template Parameters
-
- Returns
◆ FindOrAddMockStoreFor< TEntity >()
IDictionary< int, TEntity > PeanutButter.Utils.MockStoreExtensions.FindOrAddMockStoreFor< TEntity > |
( |
this object | owner | ) |
|
|
static |
Finds or creates a validating store with integer primary key and TEntity entries (ie IDictionary<int, TEntity>, but not allowing invalid PK values (ie ids must be > 0)). The store is associated with the owning object for future use.
- Parameters
-
- Template Parameters
-
- Returns
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/MockStoreExtensions.cs