C# Класс DataAccess.PlayerAccess

Показать файл Открыть проект

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

Метод Описание
GetVideoByFileName ( string fileName ) : Media
GetVideoById ( System.Guid videoId ) : Media
GetVideoByTitle ( string artist, string title ) : Media
SelectRandomId ( IQueryable query, int count, int &totalFound ) : List

Selects random videos from query result while giving higher priority to videos with higher preference.

SelectVideo ( IQueryable data, SearchSettings settings, int count, Media maintainCurrent ) : List

Return a random video from the database matching specified conditions.

SelectVideo ( SearchSettings settings, int count, Media maintainCurrent ) : List

Return a random video from the database matching specified conditions.

VideoMatchesConditions ( Media video, SearchSettings settings ) : bool

Returns whether specified video matches specified conditions.

Приватные методы

Метод Описание
PreferenceToInt ( double preference ) : int

Returns an integer representation of the preference field where its weight grows exponentially.

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

GetVideoByFileName() публичный статический Метод

public static GetVideoByFileName ( string fileName ) : Media
fileName string
Результат Media

GetVideoById() публичный статический Метод

public static GetVideoById ( System.Guid videoId ) : Media
videoId System.Guid
Результат Media

GetVideoByTitle() публичный статический Метод

public static GetVideoByTitle ( string artist, string title ) : Media
artist string
title string
Результат Media

SelectRandomId() публичный статический Метод

Selects random videos from query result while giving higher priority to videos with higher preference.
public static SelectRandomId ( IQueryable query, int count, int &totalFound ) : List
query IQueryable The query returning the list of videos to chose from.
count int The amount of videos to select.
totalFound int The total amount of videos matching the query.
Результат List

SelectVideo() публичный статический Метод

Return a random video from the database matching specified conditions.
public static SelectVideo ( IQueryable data, SearchSettings settings, int count, Media maintainCurrent ) : List
data IQueryable The list of videos in which to search; generally Entities.Media.
settings SearchSettings An object containing various search settings.
count int The quantity of results to return.
maintainCurrent Media If specified, the currently selected video will be kept.
Результат List

SelectVideo() публичный статический Метод

Return a random video from the database matching specified conditions.
public static SelectVideo ( SearchSettings settings, int count, Media maintainCurrent ) : List
settings SearchSettings An object containing various search settings.
count int The quantity of results to return.
maintainCurrent Media If specified, the currently selected video will be kept.
Результат List

VideoMatchesConditions() публичный статический Метод

Returns whether specified video matches specified conditions.
public static VideoMatchesConditions ( Media video, SearchSettings settings ) : bool
video Media The video to evaluate.
settings SearchSettings An object containing various search settings.
Результат bool