コード例 #1
0
        public void AsMARC21()
        {
            TextReader marcRecord       = new StreamReader(@"C:\Documents and Settings\wkurt\My Documents\Visual Studio 2008\Projects\TestMARC\TestMARC\makrtest.mrc");
            string     marcTransmission = marcRecord.ReadToEnd();
            MARCRecord testRecord       = new MARCRecord(marcTransmission);//decode should happen automatically here

            //right now I cannot check the header info
            Assert.True(marcTransmission.Contains(testRecord.AsMARC21()));
            marcRecord.Close();

            TextReader singleMarcRecord = new StreamReader(@"C:\Documents and Settings\wkurt\My Documents\Visual Studio 2008\Projects\TestMARC\TestMARC\one.dat");
            string     singleMarc       = singleMarcRecord.ReadToEnd();
            MARCRecord singleTest       = new MARCRecord(singleMarc);

            Assert.Equals(singleMarc, singleTest.AsMARC21());
            singleMarcRecord.Close();
        }
コード例 #2
0
 public virtual void Write(MARCRecord record)
 {
     this.fileStream.Write(record.AsMARC21());
 }