private void onLocalDownloadPath(string path) { Logger.Default.Trace("获取本地视频信息,Path:{0}", path); LocalVideosInfoPacket packet = FolderManager.GetLocalVideoInfoPacket(path); send(ParamCode.LocalDownSource, LocalVideosInfoPacket.Encode(packet)); }
public void TestFolderManager_GetLocalVideoInfoPacket() { ExceptionManager.CheckException(() => FolderManager.GetLocalVideoInfoPacket("")); ExceptionManager.CheckException(() => FolderManager.GetLocalVideoInfoPacket(@"d:\")); var packet = FolderManager.GetLocalVideoInfoPacket(@"D:\读写测试\Time_201607190900_201607191000"); Assert.AreEqual(new DateTime(2016, 7, 19, 9, 0, 0), packet.TimePeriod.BeginTime); Assert.AreEqual(2, packet.ValidTimePeriods.Length); }