Пример #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;
 }
Пример #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;
 }
Пример #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);
        }
Пример #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;
        }
Пример #5
0
 public bool Equals(RemoteException comparand)
 {
     return Equals((object)comparand);
 }
Пример #6
0
 public bool Equals(RemoteException comparand)
 {
     return(Equals((object)comparand));
 }