Beispiel #1
0
 public override void WriteBody(OperationBuilder builder)
 {
     if (typeof(T).GetTypeInfo().IsValueType || Content != null)
     {
         Transcoder.Encode(builder, Content, Flags, OpCode);
     }
 }
Beispiel #2
0
        public override byte[] CreateBody()
        {
            byte[] bytes;
            if (typeof(T).IsValueType)
            {
                bytes = Transcoder.Encode(RawValue, Flags, OperationCode);
            }
            else
            {
                bytes = RawValue == null ? new byte[0] :
                        Transcoder.Encode(RawValue, Flags, OperationCode);
            }

            return(bytes);
        }
Beispiel #3
0
        public override byte[] CreateBody()
        {
            byte[] bytes;
            if (typeof(T).GetTypeInfo().IsValueType)
            {
                bytes = Transcoder.Encode(Content, Flags, OpCode);
            }
            else
            {
                bytes = Content == null ? new byte[0] :
                        Transcoder.Encode(Content, Flags, OpCode);
            }

            return(bytes);
        }