/// <inheritdoc cref="IRuleEngine{T}"/>
        public async Task <RuleResultCollection> ValidateAsync(T message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            var context = new ValidationContext <T>(message);

            return(await _ruleCollection.ValidateAsync(context, _serviceProviderDelegate).ConfigureAwait(false));
        }