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); }
private bool IsBeginningAndEndPositionCorrect() => _message.First().CommandType == CommandType.HandShake || _message.Last().CommandType == CommandType.EndMessage;