예제 #1
0
    public static byte[] Serialize(TAbstractBase s) {
      TMemoryBuffer t = new TMemoryBuffer();
      TBinaryProtocol p = new TBinaryProtocol(t);

      s.Write(p);

      return t.GetBuffer();
    }
예제 #2
0
        public static byte[] Serialize(TAbstractBase s)
        {
            var t = new TMemoryBuffer();
            var p = new TCompactProtocol(t);

            s.Write(p);

            return(t.GetBuffer());
        }
예제 #3
0
        public static byte[] Serialize(TBase s)
        {
            var t = new TMemoryBuffer();
            var p = new TBinaryProtocol(t);

            s.Write(p);

            return(t.GetBuffer());
        }
예제 #4
0
		public static byte[] Serialize(TAbstractBase s)
		{
			TMemoryBuffer tMemoryBuffer = new TMemoryBuffer();
			s.Write(new TBinaryProtocol(tMemoryBuffer));
			return tMemoryBuffer.GetBuffer();
		}