C# Class 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.
Inheritance: IDisposable
Afficher le fichier Open project: zencoders/sambatyon

Méthodes publiques

Méthode Description
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

Method Details

Count() public méthode

Returns the number of tracks contained in the repository
public Count ( ) : int
Résultat int

Delete() public méthode

Deletes track from repository
public Delete ( string key ) : RepositoryResponse
key string Identifier of the track that has to be deleted
Résultat RepositoryResponse

Dispose() public méthode

Disposes the repository
public Dispose ( ) : void
Résultat void

Get() public méthode

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)
Résultat TrackModel

GetAll() public méthode

Gets all tracks from repository
public GetAll ( ) : ICollection
Résultat ICollection

InsertTrack() public méthode

Inserts the track file information into the repository
public InsertTrack ( TrackModel mdl ) : RepositoryResponse
mdl TrackModel Track to insert
Résultat RepositoryResponse

InsertTrack() public méthode

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
Résultat RepositoryResponse

TrackRepository() public méthode

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
Résultat System

Update() public méthode

Updates Track information
public Update ( TrackModel mdl ) : RepositoryResponse
mdl TrackModel New value of the Track
Résultat RepositoryResponse