public StartSongTask( ILoaderContext loaderContext, IPlayer player, ConfAudioVolume volumeConfig, object playManagerLock, QueueItem queueItem) { Id = Interlocked.Increment(ref _nextId); this.loaderContext = loaderContext; this.player = player; this.volumeConfig = volumeConfig; this.playManagerLock = playManagerLock; QueueItem = queueItem; }
private static void TestSongAnalyzerExpectErrorMessage(QueueItem queueItem, ILoaderContext loaderContext, string message) { var volumeDetector = new VolumeDetectorMock(); var task = new SongAnalyzerTask(queueItem, loaderContext, volumeDetector); var t = Task.Run(() => task.Run(CancellationToken.None)); var res = t.Result; Assert.IsFalse(res.Ok); Assert.AreSame(res.Error.Str, message); }
/// <summary> /// 初始化一个<see cref="PdmLoader"/>类型的实例 /// </summary> /// <param name="context">加载器上下文</param> public PdmLoader(ILoaderContext context) { _context = context; }
public SongAnalyzerTask(QueueItem source, ILoaderContext loaderContext, IVolumeDetector volumeDetector) { Source = source; VolumeDetector = volumeDetector; LoaderContext = loaderContext; }