Click or drag to resize

StorageTStorageEntity, TKey, TValue Class

A generic thread-safe repository for in-memory storage
Inheritance Hierarchy
SystemObject
  Crosser.Common.Utilities.PersistenceStorageTStorageEntity, TKey, TValue

Namespace:  Crosser.Common.Utilities.Persistence
Assembly:  Crosser.Common (in Crosser.Common.dll) Version: 0.0.4
Syntax
C#
public class Storage<TStorageEntity, TKey, TValue>
where TStorageEntity : Object, IStorageEntity<TKey, TValue>

Type Parameters

TStorageEntity
Value Type
TKey
Key Type
TValue
Value Type

The StorageTStorageEntity, TKey, TValue type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAddOrUpdate
Adds or updates the entity TValue with key TKey
Public methodAny
Check if the repository has any items at all
Public methodContainsKey
Checks if the repository has a key TK
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Find all entities T matching the expression f
Public methodFindWithKeys
Find all entities T matching the expression f and returns a Dictionary TK,T
Public methodGetAll
Returns all entities T from the repository
Public methodGetAllReadOnly
Returns all entities T from the repository as a new Array
Public methodGetAllWithKeys
Returns all entities as a Dictionary TK,T
Public methodGetById
Get a single entity T with the key TK
Public methodGetByIdWithKey
Get a single entity T as a KeyValuePair TK,T with the key TK
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove(FuncTValue, Boolean)
Removes all entities matching the expression f
Public methodRemove(TKey)
Removes the entity T with key TK
Public methodRemoveAll
Clears the repository
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also