示例#1
0
 public override void Write(Azos.Glue.Protocol.MethodSpec spec)
 {
     this.Write(spec.m_MethodName);
     m_Stream.WriteBEUInt64(spec.m_ReturnType);
     this.Write(spec.m_Signature);
     m_Stream.WriteBEUInt64(spec.m_Hash);
 }
示例#2
0
        public override Azos.Glue.Protocol.MethodSpec ReadMethodSpec()
        {
            var result = new Azos.Glue.Protocol.MethodSpec();

            result.m_MethodName = this.ReadString();
            result.m_ReturnType = m_Stream.ReadBEUInt64();
            result.m_Signature  = this.ReadByteArray();
            result.m_Hash       = m_Stream.ReadBEUInt64();
            return(result);
        }
示例#3
0
        public void MethodSpec()
        {
            using (var ms = new MemoryStream())
            {
                var r = SlimFormat.Instance.MakeReadingStreamer();
                var w = SlimFormat.Instance.MakeWritingStreamer();

                r.BindStream(ms);
                w.BindStream(ms);

                var spec = new Azos.Glue.Protocol.MethodSpec(typeof(System.Collections.Generic.List <int>).GetMethod("Clear"));

                w.Write(spec);

                ms.Seek(0, SeekOrigin.Begin);

                Aver.AreObjectsEqual(spec, r.ReadMethodSpec());
            }
        }
示例#4
0
 public abstract void Write(Azos.Glue.Protocol.MethodSpec spec);