public void ReadAndWriteOpening() { int i = 0; while (i < 10) { using (file.OpenForRead()) { } using (file.OpenForWrite()) { } i++; } i = 0; while (i < 10) { using (file.OpenForWrite()) { } using (file.OpenForRead()) { } i++; } }
public void SkippingUnknownRecords() { StdfFile file = new StdfFile(filePath); using (StdfFileReader reader = file.OpenForRead()) { reader.RecordRead += new RecordReadEventHandler(delegate(object o, RecordReadEventArgs e) { Assert.IsNotNull(e.Record); }); try { reader.Read(); } catch (Exception e) { Assert.Fail(e.Message); } } }