/// <summary> /// <para>Begins an asynchronous send to the share folder route.</para> /// </summary> /// <param name="path">The path to the folder to share. If it does not exist, then a /// new one is created.</param> /// <param name="memberPolicy">Who can be a member of this shared folder.</param> /// <param name="aclUpdatePolicy">Who can add and remove members of this shared /// folder.</param> /// <param name="sharedLinkPolicy">The policy to apply to shared links created for /// content inside this shared folder.</param> /// <param name="forceAsync">Whether to force the share to happen /// asynchronously.</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 BeginShareFolder(string path, MemberPolicy memberPolicy = null, AclUpdatePolicy aclUpdatePolicy = null, SharedLinkPolicy sharedLinkPolicy = null, bool forceAsync = false, sys.AsyncCallback callback = null, object callbackState = null) { var shareFolderArg = new ShareFolderArg(path, memberPolicy, aclUpdatePolicy, sharedLinkPolicy, forceAsync); return this.BeginShareFolder(shareFolderArg, callback, callbackState); }
/// <summary> /// <para>Begins an asynchronous send to the share folder route.</para> /// </summary> /// <param name="shareFolderArg">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 BeginShareFolder(ShareFolderArg shareFolderArg, sys.AsyncCallback callback, object state = null) { var task = this.ShareFolderAsync(shareFolderArg); return enc.Util.ToApm(task, callback, state); }
/// <summary> /// <para>Share a folder with collaborators.</para> /// <para>Most sharing will be completed synchronously. Large folders will be completed /// asynchronously. To make testing the async case repeatable, set /// `ShareFolderArg.force_async`.</para> /// <para>If a <see cref="ShareFolderLaunch.AsyncJobId" /> is returned, you'll need to /// call <see cref="Dropbox.Api.Sharing.Routes.SharingRoutes.CheckShareJobStatusAsync" /// /> until the action completes to get the metadata for the folder.</para> /// <para>Warning: This endpoint is in beta and is subject to minor but possibly /// backwards-incompatible changes.</para> /// </summary> /// <param name="path">The path to the folder to share. If it does not exist, then a /// new one is created.</param> /// <param name="memberPolicy">Who can be a member of this shared folder.</param> /// <param name="aclUpdatePolicy">Who can add and remove members of this shared /// folder.</param> /// <param name="sharedLinkPolicy">The policy to apply to shared links created for /// content inside this shared folder.</param> /// <param name="forceAsync">Whether to force the share to happen /// asynchronously.</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{ShareFolderError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="ShareFolderError"/>.</exception> public t.Task<ShareFolderLaunch> ShareFolderAsync(string path, MemberPolicy memberPolicy = null, AclUpdatePolicy aclUpdatePolicy = null, SharedLinkPolicy sharedLinkPolicy = null, bool forceAsync = false) { var shareFolderArg = new ShareFolderArg(path, memberPolicy, aclUpdatePolicy, sharedLinkPolicy, forceAsync); return this.ShareFolderAsync(shareFolderArg); }
/// <summary> /// <para>Share a folder with collaborators.</para> /// <para>Most sharing will be completed synchronously. Large folders will be completed /// asynchronously. To make testing the async case repeatable, set /// `ShareFolderArg.force_async`.</para> /// <para>If a <see cref="ShareFolderLaunch.AsyncJobId" /> is returned, you'll need to /// call <see cref="Dropbox.Api.Sharing.Routes.SharingRoutes.CheckShareJobStatusAsync" /// /> until the action completes to get the metadata for the folder.</para> /// <para>Warning: This endpoint is in beta and is subject to minor but possibly /// backwards-incompatible changes.</para> /// </summary> /// <param name="shareFolderArg">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{ShareFolderError}">Thrown if there is an /// error processing the request; This will contain a <see /// cref="ShareFolderError"/>.</exception> public t.Task<ShareFolderLaunch> ShareFolderAsync(ShareFolderArg shareFolderArg) { return this.Transport.SendRpcRequestAsync<ShareFolderArg, ShareFolderLaunch, ShareFolderError>(shareFolderArg, "api", "/sharing/share_folder", ShareFolderArg.Encoder, ShareFolderLaunch.Decoder, ShareFolderError.Decoder); }