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