/// <summary> /// <para>Initializes a new instance of the <see cref="ShareFolderArg" /> class.</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. Only /// applicable if the current user is on a team.</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. The current user must be on a team to set this /// policy to <see cref="Dropbox.Api.Sharing.SharedLinkPolicy.Members" />.</param> /// <param name="forceAsync">Whether to force the share to happen /// asynchronously.</param> /// <param name="actions">This is a list indicating whether each returned folder data /// entry will include a boolean field <see /// cref="Dropbox.Api.Sharing.FolderPermission.Allow" /> that describes whether the /// current user can perform the `FolderAction` on the folder.</param> /// <param name="linkSettings">Settings on the link for this folder.</param> /// <param name="viewerInfoPolicy">Who can enable/disable viewer info for this shared /// folder.</param> public ShareFolderArg(string path, MemberPolicy memberPolicy = null, AclUpdatePolicy aclUpdatePolicy = null, SharedLinkPolicy sharedLinkPolicy = null, bool forceAsync = false, col.IEnumerable <FolderAction> actions = null, LinkSettings linkSettings = null, ViewerInfoPolicy viewerInfoPolicy = null) { if (path == null) { throw new sys.ArgumentNullException("path"); } if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z")) { throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'"); } var actionsList = enc.Util.ToList(actions); this.Path = path; this.MemberPolicy = memberPolicy; this.AclUpdatePolicy = aclUpdatePolicy; this.SharedLinkPolicy = sharedLinkPolicy; this.ForceAsync = forceAsync; this.Actions = actionsList; this.LinkSettings = linkSettings; this.ViewerInfoPolicy = viewerInfoPolicy; }
/// <summary> /// <para>Initializes a new instance of the <see cref="UpdateFolderPolicyArg" /> /// class.</para> /// </summary> /// <param name="sharedFolderId">The ID for the shared folder.</param> /// <param name="memberPolicy">Who can be a member of this shared folder. Only /// applicable if the current user is on a team.</param> /// <param name="aclUpdatePolicy">Who can add and remove members of this shared /// folder.</param> /// <param name="viewerInfoPolicy">Who can enable/disable viewer info for this shared /// folder.</param> /// <param name="sharedLinkPolicy">The policy to apply to shared links created for /// content inside this shared folder. The current user must be on a team to set this /// policy to <see cref="Dropbox.Api.Sharing.SharedLinkPolicy.Members" />.</param> /// <param name="linkSettings">Settings on the link for this folder.</param> /// <param name="actions">A list of `FolderAction`s corresponding to /// `FolderPermission`s that should appear in the response's <see /// cref="Dropbox.Api.Sharing.SharedFolderMetadata.Permissions" /> field describing the /// actions the authenticated user can perform on the folder.</param> public UpdateFolderPolicyArg(string sharedFolderId, MemberPolicy memberPolicy = null, AclUpdatePolicy aclUpdatePolicy = null, ViewerInfoPolicy viewerInfoPolicy = null, SharedLinkPolicy sharedLinkPolicy = null, LinkSettings linkSettings = null, col.IEnumerable <FolderAction> actions = null) { if (sharedFolderId == null) { throw new sys.ArgumentNullException("sharedFolderId"); } if (!re.Regex.IsMatch(sharedFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z")) { throw new sys.ArgumentOutOfRangeException("sharedFolderId", @"Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'"); } var actionsList = enc.Util.ToList(actions); this.SharedFolderId = sharedFolderId; this.MemberPolicy = memberPolicy; this.AclUpdatePolicy = aclUpdatePolicy; this.ViewerInfoPolicy = viewerInfoPolicy; this.SharedLinkPolicy = sharedLinkPolicy; this.LinkSettings = linkSettings; this.Actions = actionsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="ShareFolderArg" /> class.</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="aclUpdatePolicy">Who can add and remove members of this shared /// folder.</param> /// <param name="forceAsync">Whether to force the share to happen /// asynchronously.</param> /// <param name="memberPolicy">Who can be a member of this shared folder. Only /// applicable if the current user is on a team.</param> /// <param name="sharedLinkPolicy">The policy to apply to shared links created for /// content inside this shared folder. The current user must be on a team to set this /// policy to <see cref="Dropbox.Api.Sharing.SharedLinkPolicy.Members" />.</param> /// <param name="viewerInfoPolicy">Who can enable/disable viewer info for this shared /// folder.</param> /// <param name="actions">A list of `FolderAction`s corresponding to /// `FolderPermission`s that should appear in the response's <see /// cref="Dropbox.Api.Sharing.SharedFolderMetadata.Permissions" /> field describing the /// actions the authenticated user can perform on the folder.</param> /// <param name="linkSettings">Settings on the link for this folder.</param> public ShareFolderArg(string path, AclUpdatePolicy aclUpdatePolicy = null, bool forceAsync = false, MemberPolicy memberPolicy = null, SharedLinkPolicy sharedLinkPolicy = null, ViewerInfoPolicy viewerInfoPolicy = null, col.IEnumerable <FolderAction> actions = null, LinkSettings linkSettings = null) : base(path, aclUpdatePolicy, forceAsync, memberPolicy, sharedLinkPolicy, viewerInfoPolicy) { var actionsList = enc.Util.ToList(actions); this.Actions = actionsList; this.LinkSettings = linkSettings; }