/// <summary>
        /// Validates the role name registry query.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns>IList&lt;ValidatorMessage&gt;.</returns>
        protected override IList <ValidatorMessage> ValidateRoleNameRegistryQuery(RoleNameRegistryQuery <string?> value)
        {
            var messages = new List <ValidatorMessage>();

            if (!(value is FindRoleIdByName))
            {
                messages.Add(TypeMismatchError <FindRoleIdByName>(value));
            }
            return(messages);
        }
        /// <summary>
        /// Validates the role query.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns>IList&lt;ValidatorMessage&gt;.</returns>
        protected override IList <ValidatorMessage> ValidateRoleNameRegistryQuery(RoleNameRegistryQuery <bool> value)
        {
            var messages = new List <ValidatorMessage>();

            if (!(value is IsRoleNameRegistered))
            {
                messages.Add(TypeMismatchError <IsRoleNameRegistered>(value));
            }
            return(messages);
        }
 /// <summary>
 /// Validates the role name registry query.
 /// </summary>
 /// <param name="query">The query.</param>
 /// <returns>IList&lt;ValidatorMessage&gt;.</returns>
 protected virtual IList <ValidatorMessage> ValidateRoleNameRegistryQuery(RoleNameRegistryQuery <T> query)
 => new List <ValidatorMessage>();