static void Main() { try { string recordText = File.ReadAllText ( "record.txt", IrbisEncoding.Ansi ); StringReader reader = new StringReader(recordText); MarcRecord record = PlainText.ReadRecord(reader) .ThrowIfNull("record!"); LocalFstProcessor processor = new LocalFstProcessor ( "C:\\IRBIS64", "SANDBOX" ); FstFile fstFile = processor.ReadFile("marc_irb.fst") .ThrowIfNull("fstFile!"); MarcRecord transformed = processor.TransformRecord ( record, fstFile ); string result = transformed.ToPlainText(); Console.WriteLine(result); } catch (Exception exception) { Console.WriteLine(exception); } }
public void ReadRecord_SimpleRead() { MarcRecord record = Connection.ReadRecord(1); Write ( record.ToPlainText().Substring(0, 50).Trim() ); }
public void WriteRecord_Test1() { MarcRecord record = _GetRecord(); record = Connection.WriteRecord(record); Write ( record.ToPlainText().Substring(0, 50).Trim() ); }
public void ReadRecord_ReadAndFormat() { MarcRecord record = Connection.ReadRecord ( "IBIS", 1, false, "@brief" ); Write ( record.ToPlainText().Substring(0, 50).Trim() ); Write(" | "); Write(record.Description); }