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