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

RegisterCommandValidator() static private method

static private RegisterCommandValidator ( Type typeToRegister, Type>.IDictionary validatorRegistry ) : void
typeToRegister System.Type
validatorRegistry Type>.IDictionary
return void
        void RegisterCommandValidator(Type typeToRegister, IDictionary<Type, Type> validatorRegistry)
        {
            var commandType = GetCommandType(typeToRegister);

            if (commandType == null || 
                commandType.IsInterface ||
                validatorRegistry.ContainsKey(commandType))
                return;

            validatorRegistry.Add(commandType, typeToRegister);
        }