Beispiel #1
0
 /// <summary>
 /// Initialize a new instance of the <see cref="WebDavManager"/> class with authType
 /// </summary>
 public WebDavManager(AuthType authType, string authName, string authValue)
 {
     if (authType == AuthType.Basic)
     {
         client                   = new WebClient.WebClient();
         client.Credentials       = new NetworkCredential(authName, authValue);
         client.AuthorizationType = authType.ToString();
     }
     else
     {
         client                   = new WebClient.WebClient(false);
         client.Credentials       = new NetworkCredential(authName, authValue);
         client.AuthorizationType = authType.ToString();
     }
 }
 public GooglePlusProxy()
 {
     WebClient = new WebClient.WebClient();
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebDavManager"/> class.
 /// </summary>
 /// <param name="credential">The credential.</param>
 public WebDavManager(WebDavCredential credential)
 {
     client = new WebClient.WebClient ();
     Credential = credential;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebDavManager"/> class.
 /// </summary>
 public WebDavManager()
 {
     client = new WebClient.WebClient ();
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebDavManager"/> class.
 /// </summary>
 /// <param name="credential">The credential.</param>
 public WebDavManager(WebDavCredential credential)
 {
     client     = new WebClient.WebClient();
     Credential = credential;
 }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebDavManager"/> class.
 /// </summary>
 public WebDavManager()
 {
     client = new WebClient.WebClient();
 }
Beispiel #7
0
		/// <summary>
		/// Downloads a remote directory as zip.
		/// </summary>
		/// <returns>The directory as zip.</returns>
		/// <param name="path">path to the remote directory to download.</param>
		public Stream DownloadDirectoryAsZip(string path) {
			var client = new WebClient.WebClient ();
			client.Credentials = dav.Credential;
			//client.Proxy = dav.Proxy;
			client.Timeout = new TimeSpan(0, 5, 0);

			var uri = GetUri ("index.php/apps/files/ajax/download.php?dir=" + WebUtility.UrlEncode(path));
			return client.ExecuteGet (uri);
		}