Show / Hide Table of Contents

Interface IRepository<T>

Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public interface IRepository<T> : IRepository
Type Parameters
Name Description
T

Properties

Extension

Gets the extension used for storing this object type.

Declaration
string Extension { get; }
Property Value
Type Description
System.String

Location

Gets the location where the objects of this type are stored

Declaration
string Location { get; }
Property Value
Type Description
System.String

Methods

Add(T)

Adds an object and object and stores it.

Declaration
void Add(T obj)
Parameters
Type Name Description
T obj

The object.

Add(IEnumerable<T>)

Add objects and stores them.

Declaration
void Add(IEnumerable<T> objects)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> objects

The objects.

Clear()

Removes all the objects from the repository.

Declaration
void Clear()

Get(String)

Gets the object with the given name.

Declaration
T Get(string name)
Parameters
Type Name Description
System.String name

The name.

Returns
Type Description
T

The object.

GetAll()

Gets all the objects in this repository.

Declaration
T[] GetAll()
Returns
Type Description
T[]

The object.

GetAllNames()

Gets all the names of the objects in this repository.

Declaration
string[] GetAllNames()
Returns
Type Description
System.String[]

The names.

Remove(String)

Remove an object by name.

Declaration
void Remove(string name)
Parameters
Type Name Description
System.String name

The object's name.

Rename(String, String)

Renames an object in the repository.

Declaration
void Rename(string currentName, string newName)
Parameters
Type Name Description
System.String currentName

The current name.

System.String newName

The new name.

Replace(T)

Replaces an object with another.

Declaration
bool Replace(T newObj)
Parameters
Type Name Description
T newObj

The object to replace the object with the same name.

Returns
Type Description
System.Boolean

ReplaceOrAdd(T)

Replaces the object if it exists, adds it otherwise.

Declaration
void ReplaceOrAdd(T obj)
Parameters
Type Name Description
T obj

The object to replace or add.

Back to top Generated by DocFX