internal SAMGroupsSet(UnsafeNativeMethods.IADsMembers iADsMembers, SAMStoreCtx storeCtx, DirectoryEntry ctxBase) { this.atBeginning = true; this.groupsEnumerator = ((IEnumerable)iADsMembers).GetEnumerator(); this.storeCtx = storeCtx; this.ctxBase = ctxBase; }
internal SAMGroupsSet(UnsafeNativeMethods.IADsMembers iADsMembers, SAMStoreCtx storeCtx, DirectoryEntry ctxBase) { this.atBeginning = true; this.groupsEnumerator = ((IEnumerable)iADsMembers).GetEnumerator(); this.storeCtx = storeCtx; this.ctxBase = ctxBase; }
private StoreCtx CreateContextFromDirectoryEntry(DirectoryEntry entry) { StoreCtx storeCtx; Debug.Assert(entry != null); GlobalDebug.WriteLineIf(GlobalDebug.Info, "PrincipalContext", "CreateContextFromDirectoryEntry: path is " + entry.Path); if (entry.Path.StartsWith("LDAP:", StringComparison.Ordinal)) { if (this.ContextType == ContextType.ApplicationDirectory) { storeCtx = new ADAMStoreCtx(entry, true, _username, _password, _name, _options); } else { storeCtx = new ADStoreCtx(entry, true, _username, _password, _options); } } else { Debug.Assert(entry.Path.StartsWith("WinNT:", StringComparison.Ordinal)); storeCtx = new SAMStoreCtx(entry, true, _username, _password, _options); } storeCtx.OwningContext = this; return(storeCtx); }
internal SAMGroupsSet(UnsafeNativeMethods.IADsMembers iADsMembers, SAMStoreCtx storeCtx, DirectoryEntry ctxBase) { GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMGroupsSet", "SAMGroupsSet: creating for path={0}", ctxBase.Path); _groupsEnumerator = ((IEnumerable)iADsMembers).GetEnumerator(); _storeCtx = storeCtx; _ctxBase = ctxBase; }
internal SAMGroupsSet(UnsafeNativeMethods.IADsMembers iADsMembers, SAMStoreCtx storeCtx, DirectoryEntry ctxBase) { GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMGroupsSet", "SAMGroupsSet: creating for path={0}", ctxBase.Path); _groupsEnumerator = ((IEnumerable)iADsMembers).GetEnumerator(); _storeCtx = storeCtx; _ctxBase = ctxBase; }
internal SAMQuerySet(List <string> schemaTypes, DirectoryEntries entries, DirectoryEntry ctxBase, int sizeLimit, SAMStoreCtx storeCtx, SAMMatcher samMatcher) { this.schemaTypes = schemaTypes; this.entries = entries; this.sizeLimit = sizeLimit; this.storeCtx = storeCtx; this.ctxBase = ctxBase; this.matcher = samMatcher; this.enumerator = this.entries.GetEnumerator(); }
internal SAMQuerySet(List<string> schemaTypes, DirectoryEntries entries, DirectoryEntry ctxBase, int sizeLimit, SAMStoreCtx storeCtx, SAMMatcher samMatcher) { this.schemaTypes = schemaTypes; this.entries = entries; this.sizeLimit = sizeLimit; this.storeCtx = storeCtx; this.ctxBase = ctxBase; this.matcher = samMatcher; this.enumerator = this.entries.GetEnumerator(); }
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(); }
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(); }
// We will iterate over all principals under ctxBase, returning only those which are in the list of types and which // satisfy ALL the matching properties. internal SAMQuerySet( List <string> schemaTypes, DirectoryEntries entries, DirectoryEntry ctxBase, int sizeLimit, SAMStoreCtx storeCtx, SAMMatcher samMatcher) { GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMQuerySet", "SAMQuerySet: creating for path={0}, sizelimit={1}", ctxBase.Path, sizeLimit); _schemaTypes = schemaTypes; _entries = entries; _sizeLimit = sizeLimit; // -1 == no limit _storeCtx = storeCtx; _ctxBase = ctxBase; _matcher = samMatcher; _enumerator = _entries.GetEnumerator(); }
// We will iterate over all principals under ctxBase, returning only those which are in the list of types and which // satisfy ALL the matching properties. internal SAMQuerySet( List<string> schemaTypes, DirectoryEntries entries, DirectoryEntry ctxBase, int sizeLimit, SAMStoreCtx storeCtx, SAMMatcher samMatcher) { GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMQuerySet", "SAMQuerySet: creating for path={0}, sizelimit={1}", ctxBase.Path, sizeLimit); _schemaTypes = schemaTypes; _entries = entries; _sizeLimit = sizeLimit; // -1 == no limit _storeCtx = storeCtx; _ctxBase = ctxBase; _matcher = samMatcher; _enumerator = _entries.GetEnumerator(); }
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; _group = group; _originalGroup = group; _recursive = recursive; _groupsVisited.Add(groupPath); // so we don't revisit it UnsafeNativeMethods.IADsMembers iADsMembers = group.Members(); _membersEnumerator = ((IEnumerable)iADsMembers).GetEnumerator(); }
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(); }
private StoreCtx CreateContextFromDirectoryEntry(DirectoryEntry entry) { StoreCtx sAMStoreCtx; if (!entry.Path.StartsWith("LDAP:", StringComparison.Ordinal)) { sAMStoreCtx = new SAMStoreCtx(entry, true, this.username, this.password, this.options); } else { if (this.ContextType != ContextType.ApplicationDirectory) { sAMStoreCtx = new ADStoreCtx(entry, true, this.username, this.password, this.options); } else { sAMStoreCtx = new ADAMStoreCtx(entry, true, this.username, this.password, this.name, this.options); } } sAMStoreCtx.OwningContext = this; return(sAMStoreCtx); }
private StoreCtx CreateContextFromDirectoryEntry(DirectoryEntry entry) { StoreCtx storeCtx; Debug.Assert(entry != null); GlobalDebug.WriteLineIf(GlobalDebug.Info, "PrincipalContext", "CreateContextFromDirectoryEntry: path is " + entry.Path); if (entry.Path.StartsWith("LDAP:", StringComparison.Ordinal)) { if (this.ContextType == ContextType.ApplicationDirectory) { storeCtx = new ADAMStoreCtx(entry, true, _username, _password, _name, _options); } else { storeCtx = new ADStoreCtx(entry, true, _username, _password, _options); } } else { Debug.Assert(entry.Path.StartsWith("WinNT:", StringComparison.Ordinal)); storeCtx = new SAMStoreCtx(entry, true, _username, _password, _options); } storeCtx.OwningContext = this; return storeCtx; }
private StoreCtx CreateContextFromDirectoryEntry(DirectoryEntry entry) { StoreCtx sAMStoreCtx; if (!entry.Path.StartsWith("LDAP:", StringComparison.Ordinal)) { sAMStoreCtx = new SAMStoreCtx(entry, true, this.username, this.password, this.options); } else { if (this.ContextType != ContextType.ApplicationDirectory) { sAMStoreCtx = new ADStoreCtx(entry, true, this.username, this.password, this.options); } else { sAMStoreCtx = new ADAMStoreCtx(entry, true, this.username, this.password, this.name, this.options); } } sAMStoreCtx.OwningContext = this; return sAMStoreCtx; }