Пример #1
0
        /// <summary>
        /// <para>Initializes a new instance of the <see cref="ListUsersOnPaperDocResponse" />
        /// class.</para>
        /// </summary>
        /// <param name="invitees">List of email addresses with their respective permission
        /// levels that are invited on the Paper doc.</param>
        /// <param name="users">List of users with their respective permission levels that are
        /// invited on the Paper folder.</param>
        /// <param name="docOwner">The Paper doc owner. This field is populated on every single
        /// response.</param>
        /// <param name="cursor">Pass the cursor into <see
        /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsUsersListContinueAsync" /> to
        /// paginate through all users. The cursor preserves all properties as specified in the
        /// original call to <see
        /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsUsersListAsync" />.</param>
        /// <param name="hasMore">Will be set to True if a subsequent call with the provided
        /// cursor to <see
        /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsUsersListContinueAsync" />
        /// returns immediately with some results. If set to False please allow some delay
        /// before making another call to <see
        /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsUsersListContinueAsync"
        /// />.</param>
        public ListUsersOnPaperDocResponse(col.IEnumerable <InviteeInfoWithPermissionLevel> invitees,
                                           col.IEnumerable <UserInfoWithPermissionLevel> users,
                                           Dropbox.Api.Sharing.UserInfo docOwner,
                                           Cursor cursor,
                                           bool hasMore)
        {
            var inviteesList = enc.Util.ToList(invitees);

            if (invitees == null)
            {
                throw new sys.ArgumentNullException("invitees");
            }

            var usersList = enc.Util.ToList(users);

            if (users == null)
            {
                throw new sys.ArgumentNullException("users");
            }

            if (docOwner == null)
            {
                throw new sys.ArgumentNullException("docOwner");
            }

            if (cursor == null)
            {
                throw new sys.ArgumentNullException("cursor");
            }

            this.Invitees = inviteesList;
            this.Users    = usersList;
            this.DocOwner = docOwner;
            this.Cursor   = cursor;
            this.HasMore  = hasMore;
        }