/// <summary>
        /// Validates the role command.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns>IList&lt;ValidatorMessage&gt;.</returns>
        protected override IList <ValidatorMessage> ValidateRoleNameRegistryCommand(RoleNameRegistryCommand value)
        {
            var messages = new List <ValidatorMessage>();

            if (value is RegisterNormalizedRoleName command)
            {
                messages.AddRange(new RoleIdValidator(InstanceName, nameof(RegisterNormalizedRoleName.RoleId)).Validate(command.RoleId));
            }
            else
            {
                messages.Add(TypeMismatchError <RegisterNormalizedRoleName>(value));
            }
            return(messages);
        }
 /// <summary>
 /// Validates the role name registry command.
 /// </summary>
 /// <param name="command">The command.</param>
 /// <returns>IList&lt;ValidatorMessage&gt;.</returns>
 protected virtual IList <ValidatorMessage> ValidateRoleNameRegistryCommand(RoleNameRegistryCommand command)
 => new List <ValidatorMessage>();