Esempio n. 1
0
 public NationBuilderRemoteException(HttpStatusCode httpStatusCode,
                                     RemoteException remoteException, NationBuilderWebRequest nationBuilderRequest, Exception innerException = null)
     : base(GetMessage(remoteException), innerException)
 {
     this.HttpStatusCode       = httpStatusCode;
     this.ExceptionCode        = null == remoteException.code ? remoteException.error : remoteException.code;
     this.RemoteException      = remoteException;
     this.NationBuilderRequest = nationBuilderRequest;
 }
Esempio n. 2
0
 public NationBuilderRemoteException(HttpStatusCode httpStatusCode,
     RemoteException remoteException, NationBuilderWebRequest nationBuilderRequest, Exception innerException = null)
     : base(GetMessage(remoteException), innerException)
 {
     this.HttpStatusCode = httpStatusCode;
     this.ExceptionCode = null == remoteException.code ? remoteException.error : remoteException.code;
     this.RemoteException = remoteException;
     this.NationBuilderRequest = nationBuilderRequest;
 }
Esempio n. 3
0
        private static string GetMessage(RemoteException remoteException)
        {
            string message = null == remoteException.message ? remoteException.error_description : remoteException.message;

            if (null != remoteException.validation_errors)
            {
                message += " Validation errors: " + String.Join("; ", remoteException.validation_errors) + ".";
            }

            return(message);
        }
Esempio n. 4
0
        private static string GetMessage(RemoteException remoteException)
        {
            string message = null == remoteException.message ? remoteException.error_description : remoteException.message;

            if (null != remoteException.validation_errors)
            {
                message += " Validation errors: " + String.Join("; ", remoteException.validation_errors) + ".";
            }

            return message;
        }
Esempio n. 5
0
 public bool Equals(RemoteException comparand)
 {
     return Equals((object)comparand);
 }
Esempio n. 6
0
 public bool Equals(RemoteException comparand)
 {
     return(Equals((object)comparand));
 }