C# Class ADBaseLibrary.Helpers.WebStream

Inheritance: Stream, IDisposable
Show file Open project: maxpiva/AnimeOfflineDownloader Class Usage Examples

Public Methods

Method Description
CreateStream ( string url, string postData, string encoding, string postencoding = "application/x-www-form-urlencoded", string uagent = null, NameValueCollection headers = null, CookieCollection cookies = null, int timeout = 10000, bool redirect = true, string referer = null, IWebProxy proxy = null ) : Task
Dispose ( ) : void
Flush ( ) : void
Get ( string url, string encoding, string uagent = null, NameValueCollection headers = null, CookieCollection cookies = null, int timeout = 10000, bool redirect = true, string referer = null, IWebProxy proxy = null ) : Task
GetAllCookiesFromHeader ( IEnumerable headers, string strHost ) : CookieCollection
Post ( string url, string>.Dictionary postdata, string encoding, string uagent = null, NameValueCollection headers = null, CookieCollection cookies = null, int timeout = 10000, bool redirect = true, string referer = null, IWebProxy proxy = null ) : Task
Read ( byte buffer, int offset, int count ) : int
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Write ( byte buffer, int offset, int count ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
ConvertCookieArraysToCookieCollection ( ArrayList al, string strHost ) : CookieCollection
ConvertCookieHeaderToArrayList ( IEnumerable headers ) : ArrayList
PopulateHeaders ( HttpRequestMessage msg, NameValueCollection headers ) : void

Method Details

CreateStream() public static method

public static CreateStream ( string url, string postData, string encoding, string postencoding = "application/x-www-form-urlencoded", string uagent = null, NameValueCollection headers = null, CookieCollection cookies = null, int timeout = 10000, bool redirect = true, string referer = null, IWebProxy proxy = null ) : Task
url string
postData string
encoding string
postencoding string
uagent string
headers System.Collections.Specialized.NameValueCollection
cookies System.Net.CookieCollection
timeout int
redirect bool
referer string
proxy IWebProxy
return Task

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Flush() public method

public Flush ( ) : void
return void

Get() public static method

public static Get ( string url, string encoding, string uagent = null, NameValueCollection headers = null, CookieCollection cookies = null, int timeout = 10000, bool redirect = true, string referer = null, IWebProxy proxy = null ) : Task
url string
encoding string
uagent string
headers System.Collections.Specialized.NameValueCollection
cookies System.Net.CookieCollection
timeout int
redirect bool
referer string
proxy IWebProxy
return Task

GetAllCookiesFromHeader() public static method

public static GetAllCookiesFromHeader ( IEnumerable headers, string strHost ) : CookieCollection
headers IEnumerable
strHost string
return System.Net.CookieCollection

Post() public static method

public static Post ( string url, string>.Dictionary postdata, string encoding, string uagent = null, NameValueCollection headers = null, CookieCollection cookies = null, int timeout = 10000, bool redirect = true, string referer = null, IWebProxy proxy = null ) : Task
url string
postdata string>.Dictionary
encoding string
uagent string
headers System.Collections.Specialized.NameValueCollection
cookies System.Net.CookieCollection
timeout int
redirect bool
referer string
proxy IWebProxy
return Task

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void