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
파일 보기 프로젝트 열기: zencoders/sambatyon

공개 메소드들

메소드 설명
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