Exemple #1
0
 private ResultSet GetGroupsHelper()
 {
     this.CheckDisposedOrDeleted();
     if (!this.unpersisted)
     {
         StoreCtx  storeCtxToUse  = this.GetStoreCtxToUse();
         ResultSet groupsMemberOf = storeCtxToUse.GetGroupsMemberOf(this);
         return(groupsMemberOf);
     }
     else
     {
         return(new EmptySet());
     }
 }
Exemple #2
0
        private ResultSet GetGroupsHelper()
        {
            // Make sure we're not disposed or deleted.
            CheckDisposedOrDeleted();

            // Unpersisted principals are not members of any group
            if (this.unpersisted)
            {
                GlobalDebug.WriteLineIf(GlobalDebug.Info, "Principal", "GetGroupsHelper: returning empty set");
                return(new EmptySet());
            }

            StoreCtx storeCtx = GetStoreCtxToUse();

            Debug.Assert(storeCtx != null);

            GlobalDebug.WriteLineIf(GlobalDebug.Info, "Principal", "GetGroupsHelper: querying");
            ResultSet resultSet = storeCtx.GetGroupsMemberOf(this);

            return(resultSet);
        }