Example #1
0
    /// <summary>
    /// Initializes a new instance of the <see cref="AbstractSubject"/> class
    /// with an empty set of permissions and principals.
    /// </summary>
    protected AbstractSubject() {
      permissions_ = new EventedSet<IPermission>(new HashSet<IPermission>());
      principals_ = new EventedSet<IPrincipal>(new HashSet<IPrincipal>());

      permissions_.ItemAdded += OnPermissionAdded;
      principals_.ItemAdded += OnPrincipalAdded;
    }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AbstractSubject"/> class
        /// with an empty set of permissions and principals.
        /// </summary>
        protected AbstractSubject()
        {
            permissions_ = new EventedSet <IPermission>(new HashSet <IPermission>());
            principals_  = new EventedSet <IPrincipal>(new HashSet <IPrincipal>());

            permissions_.ItemAdded += OnPermissionAdded;
            principals_.ItemAdded  += OnPrincipalAdded;
        }