/// <summary> /// <para>Begins an asynchronous send to the get preview route.</para> /// </summary> /// <param name="path">The path of the file to preview.</param> /// <param name="rev">Deprecated. Please specify revision in :field:'path' /// instead</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 BeginGetPreview(string path, string rev = null, sys.AsyncCallback callback = null, object callbackState = null) { var previewArg = new PreviewArg(path, rev); return this.BeginGetPreview(previewArg, callback, callbackState); }
/// <summary> /// <para>Begins an asynchronous send to the get preview route.</para> /// </summary> /// <param name="previewArg">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 BeginGetPreview(PreviewArg previewArg, sys.AsyncCallback callback, object state = null) { var task = this.GetPreviewAsync(previewArg); return enc.Util.ToApm(task, callback, state); }
/// <summary> /// <para>Get a preview for a file. Currently previews are only generated for the files /// with the following extensions: .doc, .docx, .docm, .ppt, .pps, .ppsx, .ppsm, /// .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf</para> /// </summary> /// <param name="path">The path of the file to preview.</param> /// <param name="rev">Deprecated. Please specify revision in :field:'path' /// instead</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{PreviewError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="PreviewError"/>.</exception> public t.Task<enc.IDownloadResponse<FileMetadata>> GetPreviewAsync(string path, string rev = null) { var previewArg = new PreviewArg(path, rev); return this.GetPreviewAsync(previewArg); }
/// <summary> /// <para>Get a preview for a file. Currently previews are only generated for the files /// with the following extensions: .doc, .docx, .docm, .ppt, .pps, .ppsx, .ppsm, /// .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf</para> /// </summary> /// <param name="previewArg">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{PreviewError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="PreviewError"/>.</exception> public t.Task<enc.IDownloadResponse<FileMetadata>> GetPreviewAsync(PreviewArg previewArg) { return this.Transport.SendDownloadRequestAsync<PreviewArg, FileMetadata, PreviewError>(previewArg, "content", "/files/get_preview", PreviewArg.Encoder, FileMetadata.Decoder, PreviewError.Decoder); }