public bool TryParse(Stream InStream, out ProtocolBufferRecord Message) { try { Message = Serializer.DeserializeWithLengthPrefix<ProtocolBufferRecord>(InStream, PrefixStyle.Base128); return Message.HasPayload; } catch (Exception ex) { LastError = ex.ToString(); Message = new ProtocolBufferRecord(); return false; } }
public bool TryParse(Stream InStream, out ProtocolBufferRecord Message) { try { Message = Serializer.DeserializeWithLengthPrefix <ProtocolBufferRecord>(InStream, PrefixStyle.Base128); return(Message.HasPayload); } catch (Exception ex) { LastError = ex.ToString(); Message = new ProtocolBufferRecord(); return(false); } }