public override void WriteBody(OperationBuilder builder) { if (typeof(T).GetTypeInfo().IsValueType || Content != null) { Transcoder.Encode(builder, Content, Flags, OpCode); } }
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); }
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); }