2 instantiations of Forest
System.DirectoryServices (2)
System\DirectoryServices\ActiveDirectory\Domain.cs (1)
832_cachedForest = new Forest(forestContext, forestName);
System\DirectoryServices\ActiveDirectory\Forest.cs (1)
161return new Forest(context, Utils.GetDnsNameFromDN(rootDomainNC), directoryEntryMgr);
25 references to Forest
System.DirectoryServices (21)
System\DirectoryServices\ActiveDirectory\ConfigSet.cs (2)
335private static DirectoryEntry GetSearchRootEntry(Forest forest) 401DirectoryEntry rootEntry = GetSearchRootEntry(Forest.GetCurrentForest());
System\DirectoryServices\ActiveDirectory\Domain.cs (2)
42private Forest? _cachedForest; 820public Forest Forest
System\DirectoryServices\ActiveDirectory\DomainController.cs (3)
51private Forest? _currentForest; 582public Forest Forest 590_currentForest = Forest.GetForest(forestContext);
System\DirectoryServices\ActiveDirectory\Forest.cs (14)
84public static Forest GetForest(DirectoryContext context) 103throw new ActiveDirectoryObjectNotFoundException(SR.ContextNotAssociatedWithDomain, typeof(Forest), null); 113throw new ActiveDirectoryObjectNotFoundException(SR.ForestNotFound, typeof(Forest), context.Name); 117throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Forest), null); 134throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Forest), null); 146throw new ActiveDirectoryObjectNotFoundException(SR.ForestNotFound, typeof(Forest), context.Name); 150throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Forest), null); 399public void DeleteTrustRelationship(Forest targetForest) 426public void VerifyTrustRelationship(Forest targetForest, TrustDirection direction) 490public void CreateTrustRelationship(Forest targetForest, TrustDirection direction) 556public void UpdateTrustRelationship(Forest targetForest, TrustDirection newTrustDirection) 581public void RepairTrustRelationship(Forest targetForest) 620public static Forest GetCurrentForest() => GetForest(new DirectoryContext(DirectoryContextType.Forest)); 1153private void RepairTrustHelper(Forest targetForest, TrustDirection direction)
System.DirectoryServices.AccountManagement (4)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (2)
1192Forest forest = Forest.GetForest(new DirectoryContext(DirectoryContextType.Forest, this.DnsForestName, this.credentials?.UserName, this.credentials?.Password));
System\DirectoryServices\AccountManagement\AD\ADUtils.cs (2)
475Forest currentForest = Forest.GetCurrentForest();