Beispiel #1
0
 public WebDavClientWrapper(NetworkCredentialOptions options, ILogService log, ProxyService proxy)
 {
     _log        = log;
     _credential = options.GetCredential();
     _proxy      = proxy;
     _client     = new WebDavClient(new WebDavClientParams()
     {
         Proxy = _proxy.GetWebProxy(),
         UseDefaultCredentials = _proxy.UseSystemProxy,
         Credentials           = string.IsNullOrEmpty(_credential.UserName) ? null : _credential
     });
 }
Beispiel #2
0
 public WebDavClientWrapper(NetworkCredentialOptions?options, ILogService log, ProxyService proxy)
 {
     _log = log;
     if (options != null && options.UserName != null)
     {
         _credential = options.GetCredential();
     }
     _proxy  = proxy;
     _client = new WebDavClient(new WebDavClientParams()
     {
         Proxy = _proxy.GetWebProxy(),
         UseDefaultCredentials = _proxy.UseSystemProxy,
         Credentials           = _credential
     });
 }
Beispiel #3
0
 public WebDavClientWrapper(
     NetworkCredentialOptions?options,
     ILogService log,
     IProxyService proxy,
     SecretServiceManager secretService)
 {
     _log = log;
     if (options != null && options.UserName != null)
     {
         _credential = options.GetCredential(secretService);
     }
     _proxy  = proxy;
     _client = new WebDavClient(new WebDavClientParams()
     {
         Proxy = _proxy.GetWebProxy(),
         UseDefaultCredentials = _proxy.ProxyType == WindowsProxyUsePolicy.UseWinInetProxy,
         Credentials           = _credential
     });
 }