C# Class DataAccess.PlayerAccess

Afficher le fichier Open project: mysteryx93/NaturalGroundingPlayer

Méthodes publiques

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

Private Methods

Méthode Description
PreferenceToInt ( double preference ) : int

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

Method Details

GetVideoByFileName() public static méthode

public static GetVideoByFileName ( string fileName ) : Media
fileName string
Résultat Media

GetVideoById() public static méthode

public static GetVideoById ( System.Guid videoId ) : Media
videoId System.Guid
Résultat Media

GetVideoByTitle() public static méthode

public static GetVideoByTitle ( string artist, string title ) : Media
artist string
title string
Résultat Media

SelectRandomId() public static méthode

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.
Résultat List

SelectVideo() public static méthode

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.
Résultat List

SelectVideo() public static méthode

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.
Résultat List

VideoMatchesConditions() public static méthode

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.
Résultat bool