Пример #1
0
        /// <summary>Call this method when the privileges for this user has been updated</summary>
        /// <param name="message"></param>
        public void OnPrivilegesSpecificationMessage(MessageEventArgs_602 message)
        {
            if (message.Privileges.UserName != login) {
                throw new ApplicationException("The login from the given " +
                                               "message ('" + message + "') did not match the current " +
                                               "user ('" + this + "')");
            }

            privileges = new Privileges(message.Privileges);
        }
Пример #2
0
 /// <summary>Adds or updates the privileges for the user in the given message</summary>
 /// <param name="message"></param>
 public void OnPrivilegesSpecificationMessage(MessageEventArgs_602 message)
 {
     var u = GetUser(message.Privileges.UserName);
     if (u != null) {
         u.OnPrivilegesSpecificationMessage(message);
     }
 }
Пример #3
0
 // 602
 private void OnPrivilegesSpecificationEvent(object sender, int messageId, string messageName, string message)
 {
     if (PrivilegesSpecificationEvent != null) {
         Privileges p = null;
         //Privileges p = new Privileges("", message); // CheckThis
         var m = new MessageEventArgs_602(messageId, messageName, p);
         PrivilegesSpecificationEvent(m);
     }
 }