示例#1
0
        public static byte[] TermToBinary(object term)
        {
            MemoryStream stream = new MemoryStream();

            using (TermWriter writer = new TermWriter(stream))
            {
                writer.WriteTerm(term);

                return stream.ToArray();
            }
        }
示例#2
0
        public void SendTerm(object term)
        {
            using (MemoryStream stream = PrepareSendFrame())
            {
                using (TermWriter writer = new TermWriter(stream))
                {
                    writer.WriteTerm(term);

                    CompleteSendFrame(stream);
                }
            }
        }