2 writes to context
System.DirectoryServices (2)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (2)
132
this.
context
= context;
174
this.
context
= context;
79 references to context
System.DirectoryServices (79)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (66)
367
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
372
string serverDN = (string)PropertyManager.GetPropertyValue(
context
, NTDSSiteEntry, PropertyManager.InterSiteTopologyGenerator)!;
374
DirectoryEntry tmp = DirectoryEntryManager.GetDirectoryEntry(
context
, serverDN);
378
hostname = (string)PropertyManager.GetPropertyValue(
context
, tmp.Parent, PropertyManager.DnsHostName)!;
390
int port = (int)PropertyManager.GetPropertyValue(
context
, tmp, PropertyManager.MsDSPortLDAP)!;
396
_topologyGenerator = new AdamInstance(Utils.GetNewDirectoryContext(fullHostName, DirectoryContextType.DirectoryServer,
context
), fullHostName);
400
_topologyGenerator = new DomainController(Utils.GetNewDirectoryContext(hostname, DirectoryContextType.DirectoryServer,
context
), hostname!);
447
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
466
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
492
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
514
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
607
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
643
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
664
DirectoryEntry de = DirectoryEntryManager.GetDirectoryEntry(
context
, WellKnownDN.RootDSE);
672
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
688
DirectoryEntry tmp = DirectoryEntryManager.GetDirectoryEntry(
context
, "CN=NTDS Site Settings," + (string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName)!);
700
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
798
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
848
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
869
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
899
string serverContainer = "CN=Servers," + (string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName)!;
900
DirectoryEntry de = DirectoryEntryManager.GetDirectoryEntry(
context
, serverContainer);
918
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
957
if (Utils.Compare((string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.Cn)!, fromSite) != 0)
982
DirectoryEntry serverEntry = DirectoryEntryManager.GetDirectoryEntry(
context
, _siteDN);
1007
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1027
if (Utils.Compare(otherSite, (string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.Cn)!) != 0)
1051
ADAMEntry = DirectoryEntryManager.GetDirectoryEntry(
context
, "CN=NTDS Settings," + e.Key);
1052
int port = (int)PropertyManager.GetPropertyValue(
context
, ADAMEntry, PropertyManager.MsDSPortLDAP)!;
1058
replica = new AdamInstance(Utils.GetNewDirectoryContext(fullhost, DirectoryContextType.DirectoryServer,
context
), fullhost);
1062
replica = new DomainController(Utils.GetNewDirectoryContext(host, DirectoryContextType.DirectoryServer,
context
), host);
1083
return DirectoryEntryManager.GetDirectoryEntryInternal(
context
, cachedEntry.Path);
1134
DirectoryEntry de = DirectoryEntryManager.GetDirectoryEntry(
context
, WellKnownDN.RootDSE);
1135
string config = (string)PropertyManager.GetPropertyValue(
context
, de, PropertyManager.ConfigurationNamingContext)!;
1137
de = DirectoryEntryManager.GetDirectoryEntry(
context
, subnetContainer);
1140
"(&(objectClass=subnet)(objectCategory=subnet)(siteObject=" + Utils.GetEscapedFilterValue((string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName)!) + "))",
1152
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1161
ActiveDirectorySubnet subnet = new ActiveDirectorySubnet(
context
, subnetName, null, true);
1179
DirectoryEntry de = DirectoryEntryManager.GetDirectoryEntry(
context
, WellKnownDN.RootDSE);
1182
de = DirectoryEntryManager.GetDirectoryEntry(
context
, transportContainer);
1184
"(&(objectClass=siteLink)(objectCategory=SiteLink)(siteList=" + Utils.GetEscapedFilterValue((string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName)!) + "))",
1195
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1221
link = new ActiveDirectorySiteLink(
context
, linkName, transportType, true, result.GetDirectoryEntry());
1247
DirectoryEntry de = DirectoryEntryManager.GetDirectoryEntry(
context
, WellKnownDN.RootDSE);
1248
string config = (string)PropertyManager.GetPropertyValue(
context
, de, PropertyManager.ConfigurationNamingContext)!;
1250
de = DirectoryEntryManager.GetDirectoryEntry(
context
, transportContainer);
1252
"(&(objectClass=siteLink)(objectCategory=SiteLink)(siteList=" + Utils.GetEscapedFilterValue((string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName)!) + "))",
1263
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1276
link = new ActiveDirectorySiteLink(
context
, cn, ActiveDirectoryTransportType.Rpc, true, connectionEntry);
1278
link = new ActiveDirectorySiteLink(
context
, cn, ActiveDirectoryTransportType.Smtp, true, connectionEntry);
1302
DomainController dc = DomainController.GetDomainController(Utils.GetNewDirectoryContext(serverName, DirectoryContextType.DirectoryServer,
context
));
1315
fixed (char* distinguishedName = (string)PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName)!)
1343
Domain domain = new Domain(Utils.GetNewDirectoryContext(d, DirectoryContextType.Domain,
context
), d);
1377
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1400
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1404
int port = (int)PropertyManager.GetPropertyValue(
context
, child, PropertyManager.MsDSPortLDAP)!;
1410
replica = new AdamInstance(Utils.GetNewDirectoryContext(fullHostName, DirectoryContextType.DirectoryServer,
context
), fullHostName);
1413
replica = new DomainController(Utils.GetNewDirectoryContext(hostName, DirectoryContextType.DirectoryServer,
context
), hostName);
1426
string serverContainerDN = "CN=Servers," + PropertyManager.GetPropertyValue(
context
, cachedEntry, PropertyManager.DistinguishedName);
1433
DirectoryEntry de = DirectoryEntryManager.GetDirectoryEntry(
context
, serverContainerDN);
1446
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1464
throw ExceptionHelper.GetExceptionFromCOMException(
context
, e);
1469
int port = (int)PropertyManager.GetPropertyValue(
context
, ADAMEntry, PropertyManager.MsDSPortLDAP)!;
1475
replica = new AdamInstance(Utils.GetNewDirectoryContext(fullHostName, DirectoryContextType.DirectoryServer,
context
), fullHostName);
1478
replica = new DomainController(Utils.GetNewDirectoryContext(hostName, DirectoryContextType.DirectoryServer,
context
), hostName);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteCollection.cs (9)
80
string dn = (string)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName)!;
85
string tmpDn = (string)PropertyManager.GetPropertyValue(tmp.
context
, tmp.cachedEntry, PropertyManager.DistinguishedName)!;
107
string dn = (string)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName)!;
112
string tmpDn = (string)PropertyManager.GetPropertyValue(tmp.
context
, tmp.cachedEntry, PropertyManager.DistinguishedName)!;
142
string dn = (string)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName)!;
147
string tmpDn = (string)PropertyManager.GetPropertyValue(tmp.
context
, tmp.cachedEntry, PropertyManager.DistinguishedName)!;
184
string dn = (string)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName)!;
201
string dn = (string)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName)!;
217
string newdn = (string)PropertyManager.GetPropertyValue(newsite.
context
, newsite.cachedEntry, PropertyManager.DistinguishedName)!;
System\DirectoryServices\ActiveDirectory\ReadOnlySiteCollection.cs (4)
27
string? dn = (string?)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName);
33
string? tmpDn = (string?)PropertyManager.GetPropertyValue(tmp.
context
, tmp.cachedEntry, PropertyManager.DistinguishedName);
48
string? dn = (string?)PropertyManager.GetPropertyValue(site.
context
, site.cachedEntry, PropertyManager.DistinguishedName);
54
string? tmpDn = (string?)PropertyManager.GetPropertyValue(tmp.
context
, tmp.cachedEntry, PropertyManager.DistinguishedName);