Example #1
0
 public override void Write(NFX.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);
 }
Example #2
0
        public override NFX.Glue.Protocol.MethodSpec ReadMethodSpec()
        {
            var result = new NFX.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);
        }
Example #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 NFX.Glue.Protocol.MethodSpec(typeof(System.Collections.Generic.List <int>).GetMethod("Clear"));

                w.Write(spec);

                ms.Seek(0, SeekOrigin.Begin);

                Assert.AreEqual(spec, r.ReadMethodSpec());
            }
        }
Example #4
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 NFX.Glue.Protocol.MethodSpec(typeof(System.Collections.Generic.List<int>).GetMethod("Clear"));

                            w.Write(spec);

                            ms.Seek(0, SeekOrigin.Begin);

                            Assert.AreEqual(spec, r.ReadMethodSpec());
                        }
        }
Example #5
0
 public override NFX.Glue.Protocol.MethodSpec ReadMethodSpec()
 {
     var result = new NFX.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;
 }
Example #6
0
 public abstract void Write(NFX.Glue.Protocol.MethodSpec spec);