C# Класс Persistence.TrackRepository

Repository specialization used to store track file informations. This repository is used by the transport layer to get file path using the file hash as key.
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
Count ( ) : int

Returns the number of tracks contained in the repository

Delete ( string key ) : RepositoryResponse

Deletes track from repository

Dispose ( ) : void

Disposes the repository

Get ( string key ) : TrackModel

Gets information of the track identified by a given key (file hash)

GetAll ( ) : ICollection

Gets all tracks from repository

InsertTrack ( TrackModel mdl ) : RepositoryResponse

Inserts the track file information into the repository

InsertTrack ( string filename ) : RepositoryResponse

Inserts the track file information into the repository reading it directly from the file.

TrackRepository ( string repType, RepositoryConfiguration conf ) : System

Repository Constructor that initializes the repository of the given type.

Update ( TrackModel mdl ) : RepositoryResponse

Updates Track information

Описание методов

Count() публичный Метод

Returns the number of tracks contained in the repository
public Count ( ) : int
Результат int

Delete() публичный Метод

Deletes track from repository
public Delete ( string key ) : RepositoryResponse
key string Identifier of the track that has to be deleted
Результат RepositoryResponse

Dispose() публичный Метод

Disposes the repository
public Dispose ( ) : void
Результат void

Get() публичный Метод

Gets information of the track identified by a given key (file hash)
public Get ( string key ) : TrackModel
key string Identifier of the track (file hash)
Результат TrackModel

GetAll() публичный Метод

Gets all tracks from repository
public GetAll ( ) : ICollection
Результат ICollection

InsertTrack() публичный Метод

Inserts the track file information into the repository
public InsertTrack ( TrackModel mdl ) : RepositoryResponse
mdl TrackModel Track to insert
Результат RepositoryResponse

InsertTrack() публичный Метод

Inserts the track file information into the repository reading it directly from the file.
public InsertTrack ( string filename ) : RepositoryResponse
filename string Filename where the information can be read
Результат RepositoryResponse

TrackRepository() публичный Метод

Repository Constructor that initializes the repository of the given type.
public TrackRepository ( string repType, RepositoryConfiguration conf ) : System
repType string Name of the repository Type
conf RepositoryConfiguration Configuration for the repository
Результат System

Update() публичный Метод

Updates Track information
public Update ( TrackModel mdl ) : RepositoryResponse
mdl TrackModel New value of the Track
Результат RepositoryResponse