Exemplo n.º 1
0
        internal SAMMembersSet(string groupPath, UnsafeNativeMethods.IADsGroup group, bool recursive, SAMStoreCtx storeCtx, DirectoryEntry ctxBase)
        {
            GlobalDebug.WriteLineIf(GlobalDebug.Info,
                                    "SAMMembersSet",
                                    "SAMMembersSet: groupPath={0}, recursive={1}, base={2}",
                                    groupPath,
                                    recursive,
                                    ctxBase.Path);

            _storeCtx = storeCtx;
            _ctxBase = ctxBase;

            _group = group;
            _originalGroup = group;
            _recursive = recursive;

            _groupsVisited.Add(groupPath);    // so we don't revisit it

            UnsafeNativeMethods.IADsMembers iADsMembers = group.Members();
            _membersEnumerator = ((IEnumerable)iADsMembers).GetEnumerator();
        }
Exemplo n.º 2
0
		internal SAMMembersSet(string groupPath, UnsafeNativeMethods.IADsGroup group, bool recursive, SAMStoreCtx storeCtx, DirectoryEntry ctxBase)
		{
			this.atBeginning = true;
			this.groupsVisited = new List<string>();
			this.groupsToVisit = new List<string>();
			this.foreignMembers = new List<DirectoryEntry>();
			this.foreignGroups = new List<GroupPrincipal>();
			this.storeCtx = storeCtx;
			this.ctxBase = ctxBase;
			this.@group = group;
			this.originalGroup = group;
			this.recursive = recursive;
			this.groupsVisited.Add(groupPath);
			UnsafeNativeMethods.IADsMembers aDsMember = group.Members();
			this.membersEnumerator = ((IEnumerable)aDsMember).GetEnumerator();
		}