1 write to _context
System.DirectoryServices (1)
System\DirectoryServices\ActiveDirectory\Forest.cs (1)
47_context = context;
55 references to _context
System.DirectoryServices (55)
System\DirectoryServices\ActiveDirectory\Forest.cs (55)
181DirectoryEntry partitionsEntry = DirectoryEntryManager.GetDirectoryEntry(_context, _directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.PartitionsContainer)); 198throw ExceptionHelper.GetExceptionFromCOMException(_context, e); 235return GlobalCatalog.FindOneInternal(_context, Name, null, 0); 244return GlobalCatalog.FindOneInternal(_context, Name, siteName, 0); 251return GlobalCatalog.FindOneInternal(_context, Name, null, flag); 260return GlobalCatalog.FindOneInternal(_context, Name, siteName, flag); 267return GlobalCatalog.FindAllInternal(_context, null); 276return GlobalCatalog.FindAllInternal(_context, siteName); 284return new GlobalCatalogCollection(Locator.EnumerateDomainControllers(_context, Name, null, flag)); 300return new GlobalCatalogCollection(Locator.EnumerateDomainControllers(_context, Name, siteName, flag)); 343return TrustHelper.GetTrustedDomainInfoStatus(_context, Name, targetForestName, Interop.Advapi32.TRUST_ATTRIBUTE.TRUST_ATTRIBUTE_CROSS_ORGANIZATION, true); 356TrustHelper.SetTrustedDomainInfoStatus(_context, Name, targetForestName, Interop.Advapi32.TRUST_ATTRIBUTE.TRUST_ATTRIBUTE_CROSS_ORGANIZATION, enable, true); 369return TrustHelper.GetTrustedDomainInfoStatus(_context, Name, targetForestName, Interop.Advapi32.TRUST_ATTRIBUTE.TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, true); 382TrustHelper.SetTrustedDomainInfoStatus(_context, Name, targetForestName, Interop.Advapi32.TRUST_ATTRIBUTE.TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, enable, true); 396TrustHelper.DeleteTrust(_context, Name, targetForestName, true); 410TrustHelper.DeleteTrust(_context, Name, targetForest.Name, true); 423TrustHelper.VerifyTrust(_context, Name, targetForestName, true/*forest*/, TrustDirection.Outbound, false /*just TC verification*/, null /* no need to go to specific server*/); 441TrustHelper.VerifyTrust(_context, Name, targetForest.Name, true/*forest*/, TrustDirection.Outbound, false/*just TC verification*/, null /* no need to go to specific server*/); 485DirectoryContext targetContext = Utils.GetNewDirectoryContext(targetForestName, DirectoryContextType.Forest, _context); 487TrustHelper.CreateTrust(_context, Name, targetContext, targetForestName, true, direction, trustPassword); 503TrustHelper.CreateTrust(_context, Name, targetForest.GetDirectoryContext(), targetForest.Name, true, direction, password); 512TrustHelper.CreateTrust(targetForest.GetDirectoryContext(), targetForest.Name, _context, Name, true, (TrustDirection)reverseDirection, password); 531TrustHelper.UpdateTrust(_context, Name, targetForestName, newTrustPassword, true); 553TrustHelper.UpdateTrustDirection(_context, Name, targetForestName, newTrustPassword, true /*is forest*/, newTrustDirection); 569TrustHelper.UpdateTrustDirection(_context, Name, targetForest.Name, password, true /*is forest*/, newTrustDirection); 597TrustHelper.VerifyTrust(_context, Name, targetForest.Name, true /*is forest*/, TrustDirection.Outbound, true/*reset secure channel*/, null /* no need to go to specific server*/); 708DirectoryContext domainContext = Utils.GetNewDirectoryContext(Name, DirectoryContextType.Domain, _context); 724_cachedSchema = new ActiveDirectorySchema(_context, _directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.SchemaNamingContext)); 728throw ExceptionHelper.GetExceptionFromCOMException(_context, e); 757internal DirectoryContext GetDirectoryContext() => _context; 762DirectoryEntry rootDSE = DirectoryEntryManager.GetDirectoryEntry(_context, WellKnownDN.RootDSE); 777throw ExceptionHelper.GetExceptionFromCOMException(_context, e); 800entry = DirectoryEntryManager.GetDirectoryEntry(_context, _directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.SchemaNamingContext)); 806entry = DirectoryEntryManager.GetDirectoryEntry(_context, _directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.PartitionsContainer)); 816dcName = Utils.GetDnsHostNameFromNTDSA(_context, (string)PropertyManager.GetPropertyValue(_context, entry, PropertyManager.FsmoRoleOwner)!); 820throw ExceptionHelper.GetExceptionFromCOMException(_context, e); 829DirectoryContext dcContext = Utils.GetNewDirectoryContext(dcName, DirectoryContextType.DirectoryServer, _context); 876sites.Add(new ActiveDirectorySite(_context, siteName, true)); 899throw ExceptionHelper.GetExceptionFromErrorCode(result, _context.GetServerName()); 924DirectoryEntry partitionsEntry = DirectoryEntryManager.GetDirectoryEntry(_context, _directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.PartitionsContainer)); 971DirectoryContext appNCContext = Utils.GetNewDirectoryContext(dnsName, DirectoryContextType.ApplicationPartition, _context); 978throw ExceptionHelper.GetExceptionFromCOMException(_context, e); 991DirectoryEntry partitionsEntry = DirectoryEntryManager.GetDirectoryEntry(_context, _directoryEntryMgr.ExpandWellKnownDN(WellKnownDN.PartitionsContainer)); 1026DirectoryContext domainContext = Utils.GetNewDirectoryContext(domainName, DirectoryContextType.Domain, _context); 1032throw ExceptionHelper.GetExceptionFromCOMException(_context, e); 1044authIdentity = Utils.GetAuthIdentity(_context, DirectoryContext.ADHandle); 1047if (_context.ContextType == DirectoryContextType.DirectoryServer) 1049dsHandle = Utils.GetDSHandle(_context.GetServerName(), null, authIdentity, DirectoryContext.ADHandle); 1053dsHandle = Utils.GetDSHandle(null, _context.GetServerName(), authIdentity, DirectoryContext.ADHandle); 1075serverName = Utils.GetPolicyServerName(_context, true, false, Name); 1078impersonated = Utils.Impersonate(_context); 1139TrustRelationshipInformation trust = new ForestTrustRelationshipInformation(_context, Name, unmanagedTrust, TrustType.Forest); 1162string sourceServerName = TrustHelper.UpdateTrust(_context, Name, targetForest.Name, password, true /*is forest*/); 1171TrustHelper.VerifyTrust(_context, Name, targetForest.Name, true /*is forest*/, TrustDirection.Outbound, true/*reset secure channel*/, targetServerName /* need to specify which target server */);