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;
			}
		}
示例#2
0
        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);
            }
        }