public static byte[] TermToBinary(object term) { MemoryStream stream = new MemoryStream(); using (TermWriter writer = new TermWriter(stream)) { writer.WriteTerm(term); return stream.ToArray(); } }
public void SendTerm(object term) { using (MemoryStream stream = PrepareSendFrame()) { using (TermWriter writer = new TermWriter(stream)) { writer.WriteTerm(term); CompleteSendFrame(stream); } } }