Ejemplo n.º 1
0
        /// <summary>
        /// Add a user to an email list panel's access list with the specified permissions.  If the user is already
        /// on the access list, the user's permissions will be updated to match the passed-in permissions.
        /// </summary>
        /// <param name="authenticationToken">Authentication ticket identifying calling user.</param>
        /// <param name="emailListId">ID of the email list panel.</param>
        /// <param name="uniqueIdentifier">Unique identifier of the user to add to the access list.</param>
        /// <param name="permissions">Permissions to set on the access list for the user.</param>
        private static bool AddUserToEmailListPanelAccessList(string authenticationToken, int emailListId, string uniqueIdentifier, string[] permissions)
        {
            var proxy = new InvitationManagementServiceClient();
            var result = proxy.AddUserToEmailListPanelAccessList(authenticationToken, emailListId, uniqueIdentifier, permissions);

            // Handle exceptions
            if (!result.CallSuccess)
            {
                Console.WriteLine(result.FailureMessage);
                return false;
            }

            return true;
        }