Пример #1
0
 public SecurityStore(ISecurityEngine engine)
 {
     Engine             = engine;
     SecurityIdentities = new SecurityCollection <ISecurityIdentity>().RegisterCollectionNotifyChanged(SecurityIdentitiesChanged);
     SecurityItems      = new SecurityCollection <ISecurityItem>().RegisterCollectionNotifyChanged(SecurityItemsChanged);
     Authorizations     = new SecurityCollection <IAuthorization>().RegisterCollectionNotifyChanged(AuthorizationsChanged);
 }
Пример #2
0
 public SecurityItem(SecurityStore store, string id)
 {
     _store        = store;
     Id            = id;
     _bag          = new SecurityBag();
     Children      = new SecurityCollection <ISecurityItem>().RegisterCollectionNotifyChanged(ChildrenChanged);
     Parents       = new SecurityCollection <ISecurityItem>().RegisterCollectionNotifyChanged(ParentsChanged);
     _bag.Added   += BagOnAdded;
     _bag.Removed += BagOnRemoved;
 }