本文整理汇总了C#中JMMServer.Repositories.VideoLocalRepository.GetRandomFiles方法的典型用法代码示例。如果您正苦于以下问题:C# VideoLocalRepository.GetRandomFiles方法的具体用法?C# VideoLocalRepository.GetRandomFiles怎么用?C# VideoLocalRepository.GetRandomFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JMMServer.Repositories.VideoLocalRepository
的用法示例。
在下文中一共展示了VideoLocalRepository.GetRandomFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VideoLocalRepository
/*public List<Contract_VideoLocalRenamed> RandomFileRenamePreview(int maxResults, int userID, string renameRules)
{
List<Contract_VideoLocalRenamed> ret = new List<Contract_VideoLocalRenamed>();
try
{
VideoLocalRepository repVids = new VideoLocalRepository();
foreach (VideoLocal vid in repVids.GetRandomFiles(maxResults))
{
Contract_VideoLocalRenamed vidRen = new Contract_VideoLocalRenamed();
vidRen.VideoLocalID = vid.VideoLocalID;
vidRen.VideoLocal = vid.ToContract(userID);
vidRen.NewFileName = RenameFileHelper.GetNewFileName(vid, renameRules);
ret.Add(vidRen);
}
}
catch (Exception ex)
{
logger.ErrorException(ex.ToString(), ex);
}
return ret;
}*/
public List<Contract_VideoLocal> RandomFileRenamePreview(int maxResults, int userID)
{
List<Contract_VideoLocal> ret = new List<Contract_VideoLocal>();
try
{
VideoLocalRepository repVids = new VideoLocalRepository();
foreach (VideoLocal vid in repVids.GetRandomFiles(maxResults))
ret.Add(vid.ToContract(userID));
}
catch (Exception ex)
{
logger.ErrorException(ex.ToString(), ex);
}
return ret;
}