Пример #1
0
 private static FileStream OpenRecordingAdsStream(string recordingFileName, string metaDataStreamName)
 {
     FileStream stream = null;
     try
     {
         FileAdsStreams adsStreams = new FileAdsStreams(recordingFileName);
         adsStreams.Add(metaDataStreamName);
         stream = adsStreams[metaDataStreamName].Open(FileMode.Open, FileAccess.Read, FileShare.Read);
     }
     catch
     {
     }
     return stream;
 }
Пример #2
0
        private bool CheckMetadataCopied(string destinationFileName)
        {
            Recording recording = Utility.GetRecordingMetadataFromAds(destinationFileName);

            try
            {
                FileAdsStreams adsStreams = new FileAdsStreams(destinationFileName);
                adsStreams.Add(_metaDataStreamName);
                using (Stream stream = adsStreams[_metaDataStreamName].Open(FileMode.Open, FileAccess.Read, FileShare.Read))
                {
                    stream.ReadByte();
                    stream.Close();
                    return true;
                }
            }
            catch
            {
            }
            return false;
        }