Disassembled CarotDav v1.14.7 with dotPeek 2017.2
This commit is contained in:
68
Rei.Fs/SimpleWebException.cs
Normal file
68
Rei.Fs/SimpleWebException.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Rei.Fs.SimpleWebException
|
||||
// Assembly: Rei.Fs, Version=1.13.2.8796, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: D8B08A8B-697C-4439-9CFF-1BE4EE46F7B0
|
||||
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\Rei.Fs.dll
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace Rei.Fs
|
||||
{
|
||||
public class SimpleWebException : Exception
|
||||
{
|
||||
public int StatusCode;
|
||||
public WebExceptionStatus Status;
|
||||
public Uri ResponseUri;
|
||||
public string ResponseBody;
|
||||
|
||||
public SimpleWebException(WebException ex)
|
||||
: this(ex.Message, ex.InnerException, ex.Status, ex.Response)
|
||||
{
|
||||
}
|
||||
|
||||
public SimpleWebException(WebException ex, string responsebody)
|
||||
: this(ex.Message, ex.InnerException, ex.Status, ex.Response, responsebody)
|
||||
{
|
||||
}
|
||||
|
||||
public SimpleWebException(WebExceptionStatus status)
|
||||
: this(status.ToString(), (Exception) null, status, (WebResponse) null)
|
||||
{
|
||||
}
|
||||
|
||||
public SimpleWebException(string message, WebExceptionStatus status)
|
||||
: this(message, (Exception) null, status, (WebResponse) null)
|
||||
{
|
||||
}
|
||||
|
||||
public SimpleWebException(string message, Exception innerexception, WebExceptionStatus status)
|
||||
: this(message, innerexception, status, (WebResponse) null)
|
||||
{
|
||||
}
|
||||
|
||||
public SimpleWebException(string message, Exception innerexception, WebExceptionStatus status, WebResponse response)
|
||||
: this(message, innerexception, status, response, (string) null)
|
||||
{
|
||||
}
|
||||
|
||||
public SimpleWebException(string message, Exception innerexception, WebExceptionStatus status, WebResponse response, string responsebody)
|
||||
: base(message, innerexception)
|
||||
{
|
||||
this.Status = status;
|
||||
HttpWebResponse httpWebResponse = response as HttpWebResponse;
|
||||
if (httpWebResponse != null)
|
||||
{
|
||||
this.StatusCode = (int) httpWebResponse.StatusCode;
|
||||
this.ResponseUri = httpWebResponse.ResponseUri;
|
||||
}
|
||||
FtpWebResponse ftpWebResponse = response as FtpWebResponse;
|
||||
if (ftpWebResponse != null)
|
||||
{
|
||||
this.StatusCode = (int) ftpWebResponse.StatusCode;
|
||||
this.ResponseUri = ftpWebResponse.ResponseUri;
|
||||
}
|
||||
this.ResponseBody = responsebody;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user