Skip to content

DatabaseHandler Methods

Felipe Bellini edited this page Jun 17, 2020 · 2 revisions

ClearHandler

Clears the current database handler. This causes the all internal properties to be set to default and the database xml files to be deleted.

public void ClearHandler();

CreateDatabase

Creates a database file of a type T that inherits from IDatabase.

  • T is a type that inherits from the Interface.IDatabase interface.
public void CreateDatabase<T>() where T : IDatabase;

DeleteDatabase

Deletes a database file from the computer.

  • T is a type that inherits from the Interface.IDatabase interface.
public void DeleteDatabase<T>() where T : IDatabase;

Get

Gets a selection of items that inherit from ICollectable object from their database collection.

  • T is a type that inherits from the Interface.ICollectableObjectinterface.

Returns all items of the selected type T in the database.

public ICollection<T> Get<T>() where T : ICollectableObject;

Get

Gets a selection of items that inherit from ICollectable object from their database collection.

If propertyName and propertyValue are null, then returns all items of the selected type T in the database.

If propertyName and propertyValue are NOT null, then all items matching the query (propertyNames that have propertyValues as their value).

  • <type_param> T is a type that inherits from the Interface.ICollectableObjectinterface.
  • propertyName = The name of a property defined in T
  • propertyValue = The value of a property named 'propertyName' and defined in T

Returns all items of the selected type T in the database matching the input parameters.

public ICollection<T> Get<T>(string propertyName, object propertyValue) where T : ICollectableObject;

Clone this wiki locally