Class RepositoryContainer
Collection to store repositories in, either by type or by name.
Inheritance
System.Object
RepositoryContainer
Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public class RepositoryContainer
Methods
Get<T>()
Gets repository by type.
Declaration
public IRepository<T> Get<T>()
Returns
| Type | Description |
|---|---|
| IRepository<T> | The repository. |
Type Parameters
| Name | Description |
|---|---|
| T | The type. |
Get<T>(String)
Gets repository by name.
Declaration
public IRepository<T> Get<T>(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The repository name. |
Returns
| Type | Description |
|---|---|
| IRepository<T> |
Type Parameters
| Name | Description |
|---|---|
| T | The type. |
Register(String, IRepository)
Register repository by name.
Declaration
public void Register(string name, IRepository repository)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name. |
| IRepository | repository | The repository. |
Register<T>(IRepository<T>)
Register repository by type.
Declaration
public void Register<T>(IRepository<T> repository)
Parameters
| Type | Name | Description |
|---|---|---|
| IRepository<T> | repository | The repository. |
Type Parameters
| Name | Description |
|---|---|
| T | The type. |