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); }
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); }
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()); } }
public abstract void Write(Azos.Glue.Protocol.MethodSpec spec);