Exemplo n.º 1
0
        public bool IsComplete(IMessageModel message)
        {
            _ = message ?? throw new ArgumentNullException(nameof(message));

            if (message.IsCompleted)
            {
                return(true);
            }

            if (message.Count() >= 4 && IsSecondCommandAType(message.Commands[1].CommandType) && message.Last().CommandType == CommandType.EndMessage)
            {
                return(message.IsCompleted = true);
            }
            return(false);
        }
Exemplo n.º 2
0
 private bool IsBeginningAndEndPositionCorrect() =>
 _message.First().CommandType == CommandType.HandShake ||
 _message.Last().CommandType == CommandType.EndMessage;