Bifrost.FluentValidation.Commands.CommandValidatorProvider.GetValidatorsFor C# (CSharp) Method

GetValidatorsFor() private method

private GetValidatorsFor ( Type commandType, Dictionary registeredTypes ) : IEnumerable>.Dictionary
commandType System.Type
registeredTypes Dictionary
return IEnumerable>.Dictionary
        Dictionary<Type,IEnumerable<Type>> GetValidatorsFor(Type commandType, Dictionary<Type, List<Type>> registeredTypes)
        {
            var typesOnCommand = GetTypesFromCommand(commandType).ToList();
            var validatorTypes = new Dictionary<Type, IEnumerable<Type>>();
            foreach (var typeToBeValidated in typesOnCommand)
            {
                if (registeredTypes.ContainsKey(typeToBeValidated))
                    validatorTypes.Add(typeToBeValidated, registeredTypes[typeToBeValidated]);
            }
            return validatorTypes;
        }