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