예제 #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
 internal StreamInfo(FileAdsStreams parent, string name, long size)
 {
     _parent = parent;
     _name   = name;
     _size   = size;
 }
예제 #3
0
 internal StreamInfo(FileAdsStreams parent, string name, long size)
 {
     _parent = parent;
     _name = name;
     _size = size;
 }
예제 #4
0
 public StreamEnumerator(FileAdsStreams mappings)
 {
     this.baseEnumerator = ((IEnumerable)(mappings)).GetEnumerator();
 }
예제 #5
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;
        }