Esempio n. 1
0
        private void Initialize(HttpClient httpClient)
        {
            SetWebDavDispatcher(new WebDavDispatcher(httpClient));

            var lockResponseParser = new LockResponseParser();

            SetPropfindResponseParser(new PropfindResponseParser(lockResponseParser));
            SetProppatchResponseParser(new ProppatchResponseParser());
            SetLockResponseParser(lockResponseParser);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WebDavClient"/> class.
        /// </summary>
        /// <param name="params">The parameters of the WebDAV client.</param>
        public WebDavClient(WebDavClientParams @params)
        {
            SetWebDavDispatcher(new WebDavDispatcher(ConfigureHttpClient(@params)));

            var lockResponseParser = new LockResponseParser();

            SetPropfindResponseParser(new PropfindResponseParser(lockResponseParser));
            SetProppatchResponseParser(new ProppatchResponseParser());
            SetLockResponseParser(lockResponseParser);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="WebDavClient"/> class.
        /// </summary>
        public WebDavClient(Uri baseAddress)
        {
            _dispatcher             = new WebDavDispatcher();
            _dispatcher.BaseAddress = baseAddress;

            var lockResponseParser = new LockResponseParser();

            SetPropfindResponseParser(new PropfindResponseParser(lockResponseParser));
            SetProppatchResponseParser(new ProppatchResponseParser());
            SetLockResponseParser(lockResponseParser);
        }
Esempio n. 4
0
        public WebDavClient([NotNull] HttpClient httpClient)
        {
            Check.NotNull(httpClient, nameof(httpClient));

            SetWebDavDispatcher(new WebDavDispatcher(httpClient));

            var lockResponseParser = new LockResponseParser();

            SetPropfindResponseParser(new PropfindResponseParser(lockResponseParser));
            SetProppatchResponseParser(new ProppatchResponseParser());
            SetLockResponseParser(lockResponseParser);
        }
 public PropfindResponseParser(LockResponseParser lockResponseParser)
 {
     Guard.NotNull(lockResponseParser, "lockResponseParser");
     _lockResponseParser = lockResponseParser;
 }