public virtual void OnClientValidating(EventArguments.ClientValidatingEventArgs args)
 {
     if (ClientValidating != null)
     {
         ClientValidating(args);
     }
 }
        private void ValidationRequestHandler(ValidationRequest request)
        {
            ValidationResponse response = new ValidationResponse(request);

            EventArguments.ClientValidatingEventArgs args = new EventArguments.ClientValidatingEventArgs(() =>
            {
                //Confirm Action
                Status           = StatusEnum.Validated;
                Email            = request.Email;
                response.IsValid = true;
                SendMessage(response);
                Server.OnClientValidated(this);
            },
                                                                                                         () =>
            {
                //Refuse Action
                response.IsValid   = false;
                response.HasError  = true;
                response.Exception = new AuthenticationException("Login failed for user " + request.Email);
                SendMessage(response);
            });

            args.Receiver = this;
            args.Request  = request;

            Server.OnClientValidating(args);
        }