Пример #1
0
        public void WriteFarRecord()
        {
            FarRecord      far    = CreateTestFarRecord();
            MemoryStream   stream = new MemoryStream(4);
            StdfFileWriter writer = new StdfFileWriter(stream);

            writer.WriteRecord(far);
            stream.Position = 0;
            ReadRecord(typeof(FarRecord), stream);
            writer.Dispose();
        }
Пример #2
0
 public void Finish()
 {
     if (reader != null)
     {
         reader.Close();
         reader.Dispose();
     }
     if (writer != null)
     {
         writer.Close();
         writer.Dispose();
     }
     file = null;
 }
Пример #3
0
        public void WriteMoreRecords()
        {
            MemoryStream   stream = new MemoryStream(4);
            StdfFileWriter writer = new StdfFileWriter(stream);

            writer.WriteRecord(CreateTestFarRecord());
            writer.WriteRecord(CreateTestAtrRecord());
            writer.WriteRecord(CreateTestMrrRecord());
            stream.Position = 0;
            List <Type> recordTypeList = new List <Type>(3);

            recordTypeList.Add(typeof(FarRecord));
            recordTypeList.Add(typeof(AtrRecord));
            recordTypeList.Add(typeof(MrrRecord));
            ReadRecords(recordTypeList, stream);
            writer.Dispose();
        }
Пример #4
0
 public void Dispose()
 {
     sfw.Dispose();
 }
Пример #5
0
 ///<summary>
 ///Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 ///</summary>
 ///<filterpriority>2</filterpriority>
 public void Dispose()
 {
     writer.Dispose();
 }