C# Class Core.DataBase.Helpers.DataRepositoryInMemory

Handles connections to and actions over an in-memory database.
Inheritance: LoggerFluency, IDataRepository
Afficher le fichier Open project: VitaliiAndreev/WarThunder_PresetRandomizer

Protected Properties

Свойство Type Description
_lock object

Méthodes publiques

Méthode Description
AddToNewObjects ( newObject ) : void
ClearNewObjects ( ) : void
CommitChanges ( IPersistentObject instance ) : void

Commits any changes to a specified object to the database.

DataRepositoryInMemory ( ) : Core.DataBase.Enumerations.Logger

Creates a new repository, as well as creates and configures a ISessionFactory for it.

Dispose ( ) : void

Releases unmanaged resources.

GetNewObjects ( ) : IEnumerable
PersistNewObjects ( ) : void

Persists any transient objects cached in the repository.

Query ( Func filter = null ) : IEnumerable

Reads instances (filtered if needed) of a specified persistent class from the database and caches them into a collection.

RemoveFromNewObjects ( IPersistentObject newObject ) : void

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Releases unmanaged resources.

GetObjects ( ) : IEnumerable

Private Methods

Méthode Description
InitializeNonPersistentFields ( instance ) : void

Initializes non-persistent fields of a persistent object. This method is required to finalize reading from a database.

Method Details

AddToNewObjects() public méthode

public AddToNewObjects ( newObject ) : void
Résultat void

ClearNewObjects() public méthode

public ClearNewObjects ( ) : void
Résultat void

CommitChanges() public méthode

Commits any changes to a specified object to the database.
public CommitChanges ( IPersistentObject instance ) : void
instance IPersistentObject the object instance to create/update.
Résultat void

DataRepositoryInMemory() public méthode

Creates a new repository, as well as creates and configures a ISessionFactory for it.
public DataRepositoryInMemory ( ) : Core.DataBase.Enumerations.Logger
Résultat Core.DataBase.Enumerations.Logger

Dispose() public méthode

Releases unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases unmanaged resources.
protected Dispose ( bool disposing ) : void
disposing bool Indicates whether this method is being called from .
Résultat void

GetNewObjects() public méthode

public GetNewObjects ( ) : IEnumerable
Résultat IEnumerable

GetObjects() protected méthode

protected GetObjects ( ) : IEnumerable
Résultat IEnumerable

PersistNewObjects() public méthode

Persists any transient objects cached in the repository.
public PersistNewObjects ( ) : void
Résultat void

Query() public méthode

Reads instances (filtered if needed) of a specified persistent class from the database and caches them into a collection.
public Query ( Func filter = null ) : IEnumerable
filter Func The filter by which to query objects from the database.
Résultat IEnumerable

RemoveFromNewObjects() public méthode

public RemoveFromNewObjects ( IPersistentObject newObject ) : void
newObject IPersistentObject
Résultat void

Property Details

_lock protected_oe property

protected object _lock
Résultat object