/// <summary> /// <para>Begins an asynchronous send to the list folder longpoll route.</para> /// </summary> /// <param name="cursor">A cursor as returned by <see /// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderAsync" /> or <see /// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" /></param> /// <param name="timeout">A timeout in seconds. The request will block for at most this /// length of time, plus up to 90 seconds of random jitter added to avoid the /// thundering herd problem. Care should be taken when using this parameter, as some /// network infrastructure does not support long timeouts.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginListFolderLongpoll(string cursor, ulong timeout = 30, sys.AsyncCallback callback = null, object callbackState = null) { var listFolderLongpollArg = new ListFolderLongpollArg(cursor, timeout); return this.BeginListFolderLongpoll(listFolderLongpollArg, callback, callbackState); }
/// <summary> /// <para>Begins an asynchronous send to the list folder longpoll route.</para> /// </summary> /// <param name="listFolderLongpollArg">The request parameters.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="state">A user provided object that distinguished this send from other /// send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginListFolderLongpoll(ListFolderLongpollArg listFolderLongpollArg, sys.AsyncCallback callback, object state = null) { var task = this.ListFolderLongpollAsync(listFolderLongpollArg); return enc.Util.ToApm(task, callback, state); }
/// <summary> /// <para>A longpoll endpoint to wait for changes on an account. In conjunction with /// <see cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderAsync" />, this call /// gives you a low-latency way to monitor an account for file changes. The connection /// will block until there are changes available or a timeout occurs.</para> /// </summary> /// <param name="cursor">A cursor as returned by <see /// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderAsync" /> or <see /// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" /></param> /// <param name="timeout">A timeout in seconds. The request will block for at most this /// length of time, plus up to 90 seconds of random jitter added to avoid the /// thundering herd problem. Care should be taken when using this parameter, as some /// network infrastructure does not support long timeouts.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{ListFolderLongpollError}">Thrown if there /// is an error processing the request; This will contain a <see /// cref="ListFolderLongpollError"/>.</exception> public t.Task<ListFolderLongpollResult> ListFolderLongpollAsync(string cursor, ulong timeout = 30) { var listFolderLongpollArg = new ListFolderLongpollArg(cursor, timeout); return this.ListFolderLongpollAsync(listFolderLongpollArg); }
/// <summary> /// <para>A longpoll endpoint to wait for changes on an account. In conjunction with /// <see cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderAsync" />, this call /// gives you a low-latency way to monitor an account for file changes. The connection /// will block until there are changes available or a timeout occurs.</para> /// </summary> /// <param name="listFolderLongpollArg">The request parameters</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{ListFolderLongpollError}">Thrown if there /// is an error processing the request; This will contain a <see /// cref="ListFolderLongpollError"/>.</exception> public t.Task<ListFolderLongpollResult> ListFolderLongpollAsync(ListFolderLongpollArg listFolderLongpollArg) { return this.Transport.SendRpcRequestAsync<ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError>(listFolderLongpollArg, "notify", "/files/list_folder/longpoll", ListFolderLongpollArg.Encoder, ListFolderLongpollResult.Decoder, ListFolderLongpollError.Decoder); }