778 references to PropertyManager
System.DirectoryServices (778)
System\DirectoryServices\ActiveDirectory\ActiveDirectoryInterSiteTransport.cs (6)
57
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
244
string cn = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.Cn)!;
292
string cn = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.Cn)!;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchema.cs (44)
138
schemaNC = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.SchemaNamingContext)!;
187
rootDSE.Properties[
PropertyManager
.SchemaUpdateNow].Value = 1;
242
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=classSchema)" +
243
"(!(" +
PropertyManager
.IsDefunct + "=TRUE)))";
260
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=classSchema)" +
261
"(" +
PropertyManager
.ObjectClassCategory + "=" + (int)type + ")" +
262
"(!(" +
PropertyManager
.IsDefunct + "=TRUE)))";
273
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=classSchema)" +
274
"(" +
PropertyManager
.IsDefunct + "=TRUE))";
316
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=attributeSchema)" +
317
"(!(" +
PropertyManager
.IsDefunct + "=TRUE)))";
337
str.Append(
PropertyManager
.ObjectCategory);
340
str.Append(
PropertyManager
.IsDefunct);
346
str.Append(
PropertyManager
.SearchFlags);
355
str.Append(
PropertyManager
.IsMemberOfPartialAttributeSet);
370
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=attributeSchema)" +
371
"(" +
PropertyManager
.IsDefunct + "=TRUE))";
407
propertiesToLoad[0] =
PropertyManager
.LdapDisplayName;
408
propertiesToLoad[1] =
PropertyManager
.Cn;
409
propertiesToLoad[2] =
PropertyManager
.IsDefunct;
418
string ldapDisplayName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.LdapDisplayName)!;
427
if ((res.Properties[
PropertyManager
.IsDefunct] != null) && (res.Properties[
PropertyManager
.IsDefunct].Count > 0))
429
isDefunct = (bool)res.Properties[
PropertyManager
.IsDefunct][0]!;
434
string commonName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.Cn)!;
461
propertiesToLoad[0] =
PropertyManager
.LdapDisplayName;
462
propertiesToLoad[1] =
PropertyManager
.Cn;
463
propertiesToLoad[2] =
PropertyManager
.IsDefunct;
472
string ldapDisplayName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.LdapDisplayName)!;
481
if ((res.Properties[
PropertyManager
.IsDefunct] != null) && (res.Properties[
PropertyManager
.IsDefunct].Count > 0))
483
isDefunct = (bool)res.Properties[
PropertyManager
.IsDefunct][0]!;
488
string commonName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.Cn)!;
519
string adamInstName = Utils.GetAdamDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, _schemaEntry,
PropertyManager
.FsmoRoleOwner)!);
532
string dcName = Utils.GetDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, _schemaEntry,
PropertyManager
.FsmoRoleOwner)!);
539
string adamInstName = Utils.GetAdamDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, _schemaEntry,
PropertyManager
.FsmoRoleOwner)!);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaClass.cs (89)
145
_ldapDisplayName = (string)GetValueFromCache(
PropertyManager
.LdapDisplayName, true)!;
293
SetProperty(
PropertyManager
.LdapDisplayName, _ldapDisplayName);
296
SetProperty(
PropertyManager
.GovernsID, _oid);
299
SetProperty(
PropertyManager
.Description, _description);
304
_classEntry.Properties[
PropertyManager
.PossibleSuperiors].AddRange(_possibleSuperiors.GetMultiValuedProperty());
310
_classEntry.Properties[
PropertyManager
.MustContain].AddRange(_mandatoryProperties.GetMultiValuedProperty());
316
_classEntry.Properties[
PropertyManager
.MayContain].AddRange(_optionalProperties.GetMultiValuedProperty());
322
SetProperty(
PropertyManager
.SubClassOf, _subClassOf.Name);
327
SetProperty(
PropertyManager
.SubClassOf, "top");
331
SetProperty(
PropertyManager
.ObjectClassCategory, _type);
336
SetProperty(
PropertyManager
.SchemaIDGuid, _schemaGuidBinaryForm);
342
SetProperty(
PropertyManager
.DefaultSecurityDescriptor, _defaultSDSddlForm);
456
_commonName ??= (string)GetValueFromCache(
PropertyManager
.Cn, true)!;
467
SetProperty(
PropertyManager
.Cn, value);
498
_oid = (string)GetValueFromCache(
PropertyManager
.GovernsID, true)!;
511
SetProperty(
PropertyManager
.GovernsID, value);
528
_description = (string?)GetValueFromCache(
PropertyManager
.Description, false);
541
SetProperty(
PropertyManager
.Description, value);
562
SetProperty(
PropertyManager
.IsDefunct, value);
618
_possibleSuperiors = new ActiveDirectorySchemaClassCollection(_context, this, true /* isBound */,
PropertyManager
.PossibleSuperiors, possibleSuperiorsList, true /* onlyNames */);
623
_possibleSuperiors = new ActiveDirectorySchemaClassCollection(_context, this, true /* is Bound */,
PropertyManager
.PossibleSuperiors, new ArrayList());
629
possibleSuperiorsList.AddRange(GetValuesFromCache(
PropertyManager
.PossibleSuperiors));
630
possibleSuperiorsList.AddRange(GetValuesFromCache(
PropertyManager
.SystemPossibleSuperiors));
632
_possibleSuperiors = new ActiveDirectorySchemaClassCollection(_context, this, true /* isBound */,
PropertyManager
.PossibleSuperiors, GetClasses(possibleSuperiorsList));
637
_possibleSuperiors = new ActiveDirectorySchemaClassCollection(_context, this, false /* is Bound */,
PropertyManager
.PossibleSuperiors, new ArrayList());
656
_possibleInferiors = new ReadOnlyActiveDirectorySchemaClassCollection(GetClasses(GetValuesFromCache(
PropertyManager
.PossibleInferiors)));
717
_mandatoryProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */,
PropertyManager
.MustContain, mandatoryPropertiesList, true /* onlyNames */);
722
_mandatoryProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */,
PropertyManager
.MustContain, new ArrayList());
728
propertyNames[0] =
PropertyManager
.SystemMustContain;
729
propertyNames[1] =
PropertyManager
.MustContain;
731
_mandatoryProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */,
PropertyManager
.MustContain, GetProperties(GetPropertyValuesRecursively(propertyNames)));
736
_mandatoryProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, false /* isBound */,
PropertyManager
.MustContain, new ArrayList());
793
_optionalProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */,
PropertyManager
.MayContain, optionalPropertiesList, true /* onlyNames */);
798
_optionalProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */,
PropertyManager
.MayContain, new ArrayList());
804
propertyNames[0] =
PropertyManager
.SystemMayContain;
805
propertyNames[1] =
PropertyManager
.MayContain;
816
_optionalProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, true /* isBound */,
PropertyManager
.MayContain, GetProperties(optionalPropertyList));
821
_optionalProperties = new ActiveDirectorySchemaPropertyCollection(_context, this, false /* isBound */,
PropertyManager
.MayContain, new ArrayList());
878
_auxiliaryClasses = new ActiveDirectorySchemaClassCollection(_context, this, true /* isBound */,
PropertyManager
.AuxiliaryClass, auxiliaryClassesList, true /* onlyNames */);
883
_auxiliaryClasses = new ActiveDirectorySchemaClassCollection(_context, this, true /* is Bound */,
PropertyManager
.AuxiliaryClass, new ArrayList());
889
propertyNames[0] =
PropertyManager
.AuxiliaryClass;
890
propertyNames[1] =
PropertyManager
.SystemAuxiliaryClass;
892
_auxiliaryClasses = new ActiveDirectorySchemaClassCollection(_context, this, true /* isBound */,
PropertyManager
.AuxiliaryClass, GetClasses(GetPropertyValuesRecursively(propertyNames)));
897
_auxiliaryClasses = new ActiveDirectorySchemaClassCollection(_context, this, false /* isBound */,
PropertyManager
.AuxiliaryClass, new ArrayList());
913
_subClassOf ??= new ActiveDirectorySchemaClass(_context, (string)GetValueFromCache(
PropertyManager
.SubClassOf, true)!, (DirectoryEntry?)null, _schemaEntry);
924
SetProperty(
PropertyManager
.SubClassOf, value);
941
_type = (SchemaClassType)((int)GetValueFromCache(
PropertyManager
.ObjectClassCategory, true)!);
960
SetProperty(
PropertyManager
.ObjectClassCategory, value);
975
_schemaGuidBinaryForm ??= (byte[])GetValueFromCache(
PropertyManager
.SchemaIDGuid, true)!;
988
SetProperty(
PropertyManager
.SchemaIDGuid, (value.Equals(Guid.Empty)) ? null : value.ToByteArray());
1007
_defaultSDSddlForm = (string?)GetValueFromCache(
PropertyManager
.DefaultSecurityDescriptor, false);
1028
SetProperty(
PropertyManager
.DefaultSecurityDescriptor, value?.GetSecurityDescriptorSddlForm(AccessControlSections.All));
1142
str.Append(
PropertyManager
.ObjectCategory);
1147
str.Append(
PropertyManager
.LdapDisplayName);
1151
str.Append(
PropertyManager
.Cn);
1164
str.Append(
PropertyManager
.IsDefunct);
1180
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.DistinguishedName);
1181
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.Cn);
1182
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.Description);
1183
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.PossibleInferiors);
1184
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.SubClassOf);
1185
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.ObjectClassCategory);
1186
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.SchemaIDGuid);
1187
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.DefaultSecurityDescriptor);
1188
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.AuxiliaryClass);
1189
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.SystemAuxiliaryClass);
1190
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.MustContain);
1191
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.SystemMustContain);
1192
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.MayContain);
1193
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.SystemMayContain);
1198
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.LdapDisplayName);
1199
propertyNamesWithoutRangeRetrieval.Add(
PropertyManager
.GovernsID);
1200
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.SystemPossibleSuperiors);
1201
propertyNamesWithRangeRetrieval.Add(
PropertyManager
.PossibleSuperiors);
1229
_classEntry = DirectoryEntryManager.GetDirectoryEntry(_context, (string)GetValueFromCache(
PropertyManager
.DistinguishedName, true)!);
1289
str.Append(
PropertyManager
.LdapDisplayName);
1299
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=classSchema)" + str.ToString() + "(!(" +
PropertyManager
.IsDefunct + "=TRUE)))";
1302
propertiesToLoad[0] =
PropertyManager
.LdapDisplayName;
1309
string ldapDisplayName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.LdapDisplayName)!;
1361
str.Append(
PropertyManager
.LdapDisplayName);
1371
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=attributeSchema)" + str.ToString() + "(!(" +
PropertyManager
.IsDefunct + "=TRUE)))";
1374
propertiesToLoad[0] =
PropertyManager
.LdapDisplayName;
1381
string ldapDisplayName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.LdapDisplayName)!;
1424
foreach (string auxSchemaClassName in GetValuesFromCache(
PropertyManager
.AuxiliaryClass))
1436
foreach (string auxSchemaClassName in GetValuesFromCache(
PropertyManager
.SystemAuxiliaryClass))
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaProperty.cs (81)
198
_ldapDisplayName = (string)GetValueFromCache(
PropertyManager
.LdapDisplayName, true)!;
334
SetProperty(
PropertyManager
.LdapDisplayName, _ldapDisplayName);
337
SetProperty(
PropertyManager
.AttributeID, _oid);
346
SetProperty(
PropertyManager
.Description, _description);
349
_propertyEntry.Properties[
PropertyManager
.IsSingleValued].Value = _isSingleValued;
352
_propertyEntry.Properties[
PropertyManager
.IsMemberOfPartialAttributeSet].Value = _isInGlobalCatalog;
355
_propertyEntry.Properties[
PropertyManager
.IsDefunct].Value = _isDefunct;
360
_propertyEntry.Properties[
PropertyManager
.RangeLower].Value = (int)_rangeLower.Value;
366
_propertyEntry.Properties[
PropertyManager
.RangeUpper].Value = (int)_rangeUpper.Value;
372
_propertyEntry.Properties[
PropertyManager
.SearchFlags].Value = (int)_searchFlags;
378
_propertyEntry.Properties[
PropertyManager
.LinkID].Value = (int)_linkId.Value;
384
SetProperty(
PropertyManager
.SchemaIDGuid, _schemaGuidBinaryForm);
494
_commonName ??= (string)GetValueFromCache(
PropertyManager
.Cn, true)!;
508
SetProperty(
PropertyManager
.Cn, value);
539
_oid = (string)GetValueFromCache(
PropertyManager
.AttributeID, true)!;
555
SetProperty(
PropertyManager
.AttributeID, value);
571
byte[]? omObjectClassBinaryForm = (byte[]?)GetValueFromCache(
PropertyManager
.OMObjectClass, false);
574
_syntax = MapSyntax((string)GetValueFromCache(
PropertyManager
.AttributeSyntax, true)!,
575
(int)GetValueFromCache(
PropertyManager
.OMSyntax, true)!,
611
_description = (string?)GetValueFromCache(
PropertyManager
.Description, false);
627
SetProperty(
PropertyManager
.Description, value);
658
_isSingleValued = (bool)GetValueFromCache(
PropertyManager
.IsSingleValued, true)!;
676
_propertyEntry.Properties[
PropertyManager
.IsSingleValued].Value = value;
808
object? value = GetValueFromCache(
PropertyManager
.IsMemberOfPartialAttributeSet, false);
826
_propertyEntry.Properties[
PropertyManager
.IsMemberOfPartialAttributeSet].Value = value;
844
object? value = GetValueFromCache(
PropertyManager
.RangeLower, false);
871
if (_propertyEntry.Properties.Contains(
PropertyManager
.RangeLower))
873
_propertyEntry.Properties[
PropertyManager
.RangeLower].Clear();
878
_propertyEntry.Properties[
PropertyManager
.RangeLower].Value = (int)value.Value;
897
object? value = GetValueFromCache(
PropertyManager
.RangeUpper, false);
924
if (_propertyEntry.Properties.Contains(
PropertyManager
.RangeUpper))
926
_propertyEntry.Properties[
PropertyManager
.RangeUpper].Clear();
931
_propertyEntry.Properties[
PropertyManager
.RangeUpper].Value = (int)value.Value;
953
SetProperty(
PropertyManager
.IsDefunct, value);
969
object? value = GetValueFromCache(
PropertyManager
.LinkID, false);
980
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=attributeSchema)" + "(" +
PropertyManager
.LinkID + "=" + linkIdToSearch + "))";
1012
object? value = GetValueFromCache(
PropertyManager
.LinkID, false);
1040
if (_propertyEntry.Properties.Contains(
PropertyManager
.LinkID))
1042
_propertyEntry.Properties[
PropertyManager
.LinkID].Clear();
1047
_propertyEntry.Properties[
PropertyManager
.LinkID].Value = (int)value.Value;
1063
_schemaGuidBinaryForm ??= (byte[])GetValueFromCache(
PropertyManager
.SchemaIDGuid, true)!;
1076
SetProperty(
PropertyManager
.SchemaIDGuid, (value.Equals(Guid.Empty)) ? null : value.ToByteArray());
1181
str.Append(
PropertyManager
.ObjectCategory);
1186
str.Append(
PropertyManager
.LdapDisplayName);
1190
str.Append(
PropertyManager
.Cn);
1203
str.Append(
PropertyManager
.IsDefunct);
1218
propertiesToLoad[0] =
PropertyManager
.DistinguishedName;
1219
propertiesToLoad[1] =
PropertyManager
.Cn;
1220
propertiesToLoad[2] =
PropertyManager
.AttributeSyntax;
1221
propertiesToLoad[3] =
PropertyManager
.OMSyntax;
1222
propertiesToLoad[4] =
PropertyManager
.OMObjectClass;
1223
propertiesToLoad[5] =
PropertyManager
.Description;
1224
propertiesToLoad[6] =
PropertyManager
.SearchFlags;
1225
propertiesToLoad[7] =
PropertyManager
.IsMemberOfPartialAttributeSet;
1226
propertiesToLoad[8] =
PropertyManager
.LinkID;
1227
propertiesToLoad[9] =
PropertyManager
.SchemaIDGuid;
1228
propertiesToLoad[10] =
PropertyManager
.RangeLower;
1229
propertiesToLoad[11] =
PropertyManager
.RangeUpper;
1235
propertiesToLoad[0] =
PropertyManager
.DistinguishedName;
1236
propertiesToLoad[1] =
PropertyManager
.Cn;
1237
propertiesToLoad[2] =
PropertyManager
.AttributeSyntax;
1238
propertiesToLoad[3] =
PropertyManager
.OMSyntax;
1239
propertiesToLoad[4] =
PropertyManager
.OMObjectClass;
1240
propertiesToLoad[5] =
PropertyManager
.Description;
1241
propertiesToLoad[6] =
PropertyManager
.SearchFlags;
1242
propertiesToLoad[7] =
PropertyManager
.IsMemberOfPartialAttributeSet;
1243
propertiesToLoad[8] =
PropertyManager
.LinkID;
1244
propertiesToLoad[9] =
PropertyManager
.SchemaIDGuid;
1245
propertiesToLoad[10] =
PropertyManager
.AttributeID;
1246
propertiesToLoad[11] =
PropertyManager
.IsSingleValued;
1247
propertiesToLoad[12] =
PropertyManager
.RangeLower;
1248
propertiesToLoad[13] =
PropertyManager
.RangeUpper;
1249
propertiesToLoad[14] =
PropertyManager
.LdapDisplayName;
1287
_propertyEntry = DirectoryEntryManager.GetDirectoryEntry(_context, (string)GetValueFromCache(
PropertyManager
.DistinguishedName, true)!);
1305
object? value = GetValueFromCache(
PropertyManager
.SearchFlags, false);
1334
_propertyEntry.Properties[
PropertyManager
.SearchFlags].Value = (int)_searchFlags;
1350
_propertyEntry.Properties[
PropertyManager
.SearchFlags].Value = (int)_searchFlags;
1396
_propertyEntry.Properties[
PropertyManager
.AttributeSyntax].Value = s_syntaxes[(int)syntax].attributeSyntax;
1397
_propertyEntry.Properties[
PropertyManager
.OMSyntax].Value = s_syntaxes[(int)syntax].oMSyntax;
1401
_propertyEntry.Properties[
PropertyManager
.OMObjectClass].Value = oMObjectClass.Data;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (74)
75
sitedn = "CN=Sites," + (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
140
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
179
_siteDN = "CN=Sites," + (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
185
_RPCBridgeheadServers = new DirectoryServerCollection(context, (string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!, transportDN);
187
_SMTPBridgeheadServers = new DirectoryServerCollection(context, (string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!, transportDN);
372
string serverDN = (string)
PropertyManager
.GetPropertyValue(context, NTDSSiteEntry,
PropertyManager
.InterSiteTopologyGenerator)!;
378
hostname = (string)
PropertyManager
.GetPropertyValue(context, tmp.Parent,
PropertyManager
.DnsHostName)!;
390
int port = (int)
PropertyManager
.GetPropertyValue(context, tmp,
PropertyManager
.MsDSPortLDAP)!;
688
DirectoryEntry tmp = DirectoryEntryManager.GetDirectoryEntry(context, "CN=NTDS Site Settings," + (string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!);
899
string serverContainer = "CN=Servers," + (string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!;
926
string objectCategoryValue = (string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.ObjectCategory)!;
929
hostNameTable.Add((string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.DistinguishedName)!, (string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.DnsHostName)!);
935
string objectCategoryValue = (string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.ObjectCategory)!;
938
string fromServer = (string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.FromServer)!;
947
string serverObjectName = Utils.GetPartialDN((string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.DistinguishedName)!, 2);
957
if (Utils.Compare((string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.Cn)!, fromSite) != 0)
1014
string fromServer = (string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.FromServer)!;
1019
string otherSite = Utils.GetPartialDN((string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.DistinguishedName)!, 4);
1027
if (Utils.Compare(otherSite, (string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.Cn)!) != 0)
1052
int port = (int)
PropertyManager
.GetPropertyValue(context, ADAMEntry,
PropertyManager
.MsDSPortLDAP)!;
1135
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
1140
"(&(objectClass=subnet)(objectCategory=subnet)(siteObject=" + Utils.GetEscapedFilterValue((string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!) + "))",
1160
subnetName = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.Cn)!;
1184
"(&(objectClass=siteLink)(objectCategory=SiteLink)(siteList=" + Utils.GetEscapedFilterValue((string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!) + "))",
1204
string dn = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.DistinguishedName)!;
1205
string linkName = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.Cn)!;
1248
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
1252
"(&(objectClass=siteLink)(objectCategory=SiteLink)(siteList=" + Utils.GetEscapedFilterValue((string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!) + "))",
1272
string cn = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.Cn)!;
1273
string transport = Utils.GetDNComponents((string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.DistinguishedName)!)[1].Value!;
1315
fixed (char* distinguishedName = (string)
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName)!)
1384
string hostName = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.DnsHostName)!;
1404
int port = (int)
PropertyManager
.GetPropertyValue(context, child,
PropertyManager
.MsDSPortLDAP)!;
1426
string serverContainerDN = "CN=Servers," +
PropertyManager
.GetPropertyValue(context, cachedEntry,
PropertyManager
.DistinguishedName);
1454
string hostName = (string)
PropertyManager
.GetSearchResultPropertyValue(result,
PropertyManager
.DnsHostName)!;
1469
int port = (int)
PropertyManager
.GetPropertyValue(context, ADAMEntry,
PropertyManager
.MsDSPortLDAP)!;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteCollection.cs (18)
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\ActiveDirectorySiteLink.cs (4)
53
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
130
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkBridge.cs (4)
45
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
117
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkCollection.cs (18)
78
string dn = (string)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName)!;
83
string tmpDn = (string)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName)!;
106
string dn = (string)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName)!;
111
string tmpDn = (string)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName)!;
143
string dn = (string)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName)!;
148
string tmpDn = (string)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName)!;
185
string dn = (string)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName)!;
202
string dn = (string)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName)!;
218
string newdn = (string)
PropertyManager
.GetPropertyValue(newLink.context, newLink.cachedEntry,
PropertyManager
.DistinguishedName)!;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnet.cs (4)
32
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
125
string config = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ConfigurationNamingContext)!;
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnetCollection.cs (16)
96
string dn = (string)
PropertyManager
.GetPropertyValue(subnet.context, subnet.cachedEntry,
PropertyManager
.DistinguishedName)!;
101
string tmpDn = (string)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName)!;
124
string dn = (string)
PropertyManager
.GetPropertyValue(subnet.context, subnet.cachedEntry,
PropertyManager
.DistinguishedName)!;
129
string tmpDn = (string)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName)!;
161
string dn = (string)
PropertyManager
.GetPropertyValue(subnet.context, subnet.cachedEntry,
PropertyManager
.DistinguishedName)!;
166
string tmpDn = (string)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName)!;
210
string dn = (string)
PropertyManager
.GetPropertyValue(subnet.context, subnet.cachedEntry,
PropertyManager
.DistinguishedName)!;
237
string dn = (string)
PropertyManager
.GetPropertyValue(subnet.context, subnet.cachedEntry,
PropertyManager
.DistinguishedName)!;
System\DirectoryServices\ActiveDirectory\ADAMInstance.cs (31)
46
_becomeRoleOwnerAttrs[0] =
PropertyManager
.BecomeSchemaMaster;
47
_becomeRoleOwnerAttrs[1] =
PropertyManager
.BecomeDomainMaster;
71
_becomeRoleOwnerAttrs[0] =
PropertyManager
.BecomeSchemaMaster;
72
_becomeRoleOwnerAttrs[1] =
PropertyManager
.BecomeDomainMaster;
145
dnsHostName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DnsHostName)!;
279
roleObjectEntry.Properties[
PropertyManager
.FsmoRoleOwner].Value = NtdsaObjectName;
504
_cachedHostName = (string)
PropertyManager
.GetPropertyValue(context, serverEntry,
PropertyManager
.DnsHostName)!;
518
_cachedLdapPort = (int)
PropertyManager
.GetPropertyValue(context, ntdsaEntry,
PropertyManager
.MsDSPortLDAP)!;
532
_cachedSslPort = (int)
PropertyManager
.GetPropertyValue(context, ntdsaEntry,
PropertyManager
.MsDSPortSSL)!;
556
if (NtdsaObjectName.Equals((string)
PropertyManager
.GetPropertyValue(context, schemaEntry,
PropertyManager
.FsmoRoleOwner)!))
563
if (NtdsaObjectName.Equals((string)
PropertyManager
.GetPropertyValue(context, partitionsEntry,
PropertyManager
.FsmoRoleOwner)!))
595
if (ntdsaEntry.Properties[
PropertyManager
.MsDSDefaultNamingContext].Value == null)
602
_cachedDefaultPartition = (string)
PropertyManager
.GetPropertyValue(context, ntdsaEntry,
PropertyManager
.MsDSDefaultNamingContext)!;
620
if (ntdsaEntry.Properties.Contains(
PropertyManager
.MsDSDefaultNamingContext))
622
ntdsaEntry.Properties[
PropertyManager
.MsDSDefaultNamingContext].Clear();
641
ntdsaEntry.Properties[
PropertyManager
.MsDSDefaultNamingContext].Value = value;
675
cachedSiteName = (string)
PropertyManager
.GetPropertyValue(context, siteEntry,
PropertyManager
.Cn)!;
722
cachedServerObjectName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.ServerName)!;
747
cachedNtdsaObjectName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DsServiceName)!;
770
byte[] guidByteArray = (byte[])
PropertyManager
.GetPropertyValue(context, ntdsaEntry,
PropertyManager
.ObjectGuid)!;
System\DirectoryServices\ActiveDirectory\ApplicationPartition.cs (38)
214
str.Append(
PropertyManager
.ObjectCategory);
216
str.Append(
PropertyManager
.SystemFlags);
220
str.Append(
PropertyManager
.SystemFlags);
224
str.Append(
PropertyManager
.NCName);
232
propertiesToLoad[0] =
PropertyManager
.DnsRoot;
233
propertiesToLoad[1] =
PropertyManager
.NCName;
268
appNCDnsName = (res.Properties[
PropertyManager
.DnsRoot].Count > 0) ? (string)res.Properties[
PropertyManager
.DnsRoot][0]! : null;
285
foreach (string namingContext in rootDSE.Properties[
PropertyManager
.NamingContexts])
342
partition = new ApplicationPartition(appNCContext, (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.NCName)!, appNCDnsName, appType, directoryEntryMgr);
651
string primaryServerNtdsaName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DsServiceName)!;
659
string crossRefDN = (string)
PropertyManager
.GetPropertyValue(context, _crossRefEntry!,
PropertyManager
.DistinguishedName)!;
668
fsmoRootDSE.Properties[
PropertyManager
.ReplicateSingleObject].Value = primaryServerNtdsaName + ":" + crossRefDN;
688
_crossRefEntry!.Properties[
PropertyManager
.MsDSNCReplicaLocations].AddRange(_cachedDirectoryServers.GetMultiValuedProperty());
692
_crossRefEntry!.Properties[
PropertyManager
.MsDSSDReferenceDomain].Value = _securityRefDomain;
789
if (_crossRefEntry.Properties[
PropertyManager
.MsDSSDReferenceDomain].Count > 0)
791
return (string?)_crossRefEntry.Properties[
PropertyManager
.MsDSSDReferenceDomain].Value;
824
if (_crossRefEntry.Properties.Contains(
PropertyManager
.MsDSSDReferenceDomain))
826
_crossRefEntry.Properties[
PropertyManager
.MsDSSDReferenceDomain].Clear();
832
_crossRefEntry.Properties[
PropertyManager
.MsDSSDReferenceDomain].Value = value;
915
serverDnsName = (string?)
PropertyManager
.GetPropertyValue(this.context, rootDSEEntry,
PropertyManager
.DnsHostName);
950
_domainDNSEntry = parent.Children.Add(Utils.GetRdnFromDN(distinguishedName),
PropertyManager
.DomainDNS);
952
_domainDNSEntry.Properties[
PropertyManager
.InstanceType].Value = NCFlags.InstanceTypeIsNCHead | NCFlags.InstanceTypeIsWriteable;
995
_domainDNSEntry.Properties[
PropertyManager
.InstanceType].Value = NCFlags.InstanceTypeIsNCHead | NCFlags.InstanceTypeIsWriteable;
1036
string ntdsaName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DsServiceName)!;
1046
_crossRefEntry.Properties[
PropertyManager
.DnsRoot].Value = dnsHostName;
1047
_crossRefEntry.Properties[
PropertyManager
.Enabled].Value = false;
1048
_crossRefEntry.Properties[
PropertyManager
.NCName].Value = distinguishedName;
1067
foreach (string supportedCapability in rootDSE.Properties[
PropertyManager
.SupportedCapabilities])
1126
namingFsmo = Utils.GetDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, partitionsEntry,
PropertyManager
.FsmoRoleOwner)!);
1130
namingFsmo = Utils.GetAdamDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, partitionsEntry,
PropertyManager
.FsmoRoleOwner)!);
System\DirectoryServices\ActiveDirectory\ConfigSet.cs (32)
117
configSetName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.ConfigurationNamingContext)!;
223
_cachedSecurityLevel = (ReplicationSecurityLevel)((int)
PropertyManager
.GetPropertyValue(_context, configEntry,
PropertyManager
.MsDSReplAuthenticationMode)!);
239
configEntry.Properties[
PropertyManager
.MsDSReplAuthenticationMode].Value = (int)securityLevel;
352
string? isGCReady = (string?)
PropertyManager
.GetPropertyValue(forestContext, rootDSE,
PropertyManager
.IsGlobalCatalogReady);
393
string dnsHostName = (string?)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DnsHostName)!;
413
str.Append(
PropertyManager
.ObjectCategory);
416
str.Append(
PropertyManager
.Keywords);
418
str.Append(
PropertyManager
.Keywords);
426
propertiesToLoad[0] =
PropertyManager
.ServiceBindingInformation;
441
foreach (string bindingInfo in res.Properties[
PropertyManager
.ServiceBindingInformation])
604
adamInstName = Utils.GetAdamDnsHostNameFromNTDSA(_context, (string)
PropertyManager
.GetPropertyValue(_context, entry,
PropertyManager
.FsmoRoleOwner)!);
630
string filter = "(" +
PropertyManager
.ObjectCategory + "=site)";
633
propertiesToLoad[0] =
PropertyManager
.Cn;
645
sites.Add(new ActiveDirectorySite(_context, (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.Cn)!, true));
674
str.Append(
PropertyManager
.ObjectCategory);
676
str.Append(
PropertyManager
.SystemFlags);
680
str.Append(
PropertyManager
.SystemFlags);
687
propertiesToLoad[0] =
PropertyManager
.NCName;
688
propertiesToLoad[1] =
PropertyManager
.MsDSNCReplicaLocations;
697
string? schemaNamingContext = (string?)
PropertyManager
.GetPropertyValue(_context, rootDSE,
PropertyManager
.SchemaNamingContext);
698
string? configurationNamingContext = (string?)
PropertyManager
.GetPropertyValue(_context, rootDSE,
PropertyManager
.ConfigurationNamingContext);
704
string nCName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.NCName)!;
708
ResultPropertyValueCollection replicaLocations = res.Properties[
PropertyManager
.MsDSNCReplicaLocations];
System\DirectoryServices\ActiveDirectory\DirectoryEntryManager.cs (16)
180
distinguishedName = (string)
PropertyManager
.GetPropertyValue(_context, rootDSE,
PropertyManager
.RootDomainNamingContext)!;
186
distinguishedName = (string)
PropertyManager
.GetPropertyValue(_context, rootDSE,
PropertyManager
.DefaultNamingContext)!;
192
distinguishedName = (string)
PropertyManager
.GetPropertyValue(_context, rootDSE,
PropertyManager
.SchemaNamingContext)!;
198
distinguishedName = (string)
PropertyManager
.GetPropertyValue(_context, rootDSE,
PropertyManager
.ConfigurationNamingContext)!;
290
distinguishedName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.RootDomainNamingContext)!;
303
distinguishedName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DefaultNamingContext)!;
316
distinguishedName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.SchemaNamingContext)!;
329
distinguishedName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.ConfigurationNamingContext)!;
System\DirectoryServices\ActiveDirectory\DirectoryServer.cs (7)
104
_ = (string?)
PropertyManager
.GetPropertyValue(context, serverEntry,
PropertyManager
.DistinguishedName);
225
foreach (string partition in rootDSE.Properties[
PropertyManager
.NamingContexts])
236
propertyNames.Add(
PropertyManager
.HasPartialReplicaNCs);
248
ArrayList readOnlyPartitions = (ArrayList)values[
PropertyManager
.HasPartialReplicaNCs.ToLowerInvariant()]!;
781
ReplicationConnection con = new ReplicationConnection(newContext, r.GetDirectoryEntry(), (string)
PropertyManager
.GetSearchResultPropertyValue(r,
PropertyManager
.Cn)!);
System\DirectoryServices\ActiveDirectory\DirectoryServerCollection.cs (4)
252
if (_crossRefEntry.Properties.Contains(
PropertyManager
.MsDSNCReplicaLocations))
254
_crossRefEntry.Properties[
PropertyManager
.MsDSNCReplicaLocations].Clear();
284
_crossRefEntry.Properties[
PropertyManager
.MsDSNCReplicaLocations].Add(ntdsaName);
330
_crossRefEntry.Properties[
PropertyManager
.MsDSNCReplicaLocations].Remove(ntdsaName);
System\DirectoryServices\ActiveDirectory\Domain.cs (44)
110
defaultDomainNC = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DefaultNamingContext)!;
186
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = domainMode;
194
domainEntry.Properties[
PropertyManager
.NTMixedDomain].Value = 0;
207
domainEntry.Properties[
PropertyManager
.NTMixedDomain].Value = 0;
297
domainEntry.Properties[
PropertyManager
.NTMixedDomain].Value = 0;
301
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 1;
305
domainEntry.Properties[
PropertyManager
.NTMixedDomain].Value = 0;
306
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 2;
320
domainEntry.Properties[
PropertyManager
.NTMixedDomain].Value = 0;
321
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 2;
345
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 2;
349
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 3;
353
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 4;
357
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 5;
361
domainEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = 6;
829
string rootDomainNC = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.RootDomainNamingContext)!;
938
if (rootDSE.Properties.Contains(
PropertyManager
.DomainFunctionality))
940
domainFunctionality = int.Parse((string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DomainFunctionality)!, NumberFormatInfo.InvariantInfo);
980
int ntMixedDomain = (int)
PropertyManager
.GetPropertyValue(context, domainEntry,
PropertyManager
.NTMixedDomain)!;
1061
dcName = Utils.GetDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, entry,
PropertyManager
.FsmoRoleOwner)!);
1093
str.Append(
PropertyManager
.ObjectCategory);
1095
str.Append(
PropertyManager
.SystemFlags);
1099
str.Append(
PropertyManager
.SystemFlags);
1103
str.Append(
PropertyManager
.DnsRoot);
1111
propertiesToLoad[0] =
PropertyManager
.DistinguishedName;
1112
propertiesToLoad[1] =
PropertyManager
.TrustParent;
1117
_crossRefDN = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DistinguishedName)!;
1120
if (res.Properties[
PropertyManager
.TrustParent].Count > 0)
1122
_trustParent = (string?)res.Properties[
PropertyManager
.TrustParent][0];
1149
parentDomainName = (string)
PropertyManager
.GetPropertyValue(context, parentCrossRef,
PropertyManager
.DnsRoot)!;
1185
str.Append(
PropertyManager
.ObjectCategory);
1187
str.Append(
PropertyManager
.SystemFlags);
1191
str.Append(
PropertyManager
.SystemFlags);
1195
str.Append(
PropertyManager
.TrustParent);
1202
propertiesToLoad[0] =
PropertyManager
.DnsRoot;
1209
string childDomainName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsRoot)!;
System\DirectoryServices\ActiveDirectory\DomainController.cs (23)
82
_becomeRoleOwnerAttrs[0] =
PropertyManager
.BecomeSchemaMaster;
83
_becomeRoleOwnerAttrs[1] =
PropertyManager
.BecomeDomainMaster;
84
_becomeRoleOwnerAttrs[2] =
PropertyManager
.BecomePdc;
85
_becomeRoleOwnerAttrs[3] =
PropertyManager
.BecomeRidMaster;
86
_becomeRoleOwnerAttrs[4] =
PropertyManager
.BecomeInfrastructureMaster;
155
dcDnsName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DnsHostName)!;
268
if (serverNtdsaEntry.Properties[
PropertyManager
.Options].Value != null)
270
options = (int)serverNtdsaEntry.Properties[
PropertyManager
.Options].Value!;
272
serverNtdsaEntry.Properties[
PropertyManager
.Options].Value = options | 1;
294
if (serverNtdsaEntry.Properties[
PropertyManager
.Options].Value != null)
296
options = (int)serverNtdsaEntry.Properties[
PropertyManager
.Options].Value!;
386
System.DirectoryServices.UnsafeNativeMethods.IADsLargeInteger ridPool = (System.DirectoryServices.UnsafeNativeMethods.IADsLargeInteger)roleObjectEntry.Properties[
PropertyManager
.RIDAvailablePool].Value!;
394
roleObjectEntry.Properties[
PropertyManager
.RIDAvailablePool].Value = ridPool;
396
roleObjectEntry.Properties[
PropertyManager
.FsmoRoleOwner].Value = NtdsaObjectName;
607
serverUTCTime = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.CurrentTime)!;
628
serverHighestCommittedUsn = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.HighestCommittedUSN)!;
648
_cachedOSVersion = (string)
PropertyManager
.GetPropertyValue(context, computerEntry,
PropertyManager
.OperatingSystem)!;
665
string osVersion = (string)
PropertyManager
.GetPropertyValue(context, computerEntry,
PropertyManager
.OperatingSystemVersion)!;
System\DirectoryServices\ActiveDirectory\Forest.cs (24)
136
rootDomainNC = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.RootDomainNamingContext)!;
187
partitionsEntry.Properties[
PropertyManager
.MsDSBehaviorVersion].Value = forestMode;
765
if (!rootDSE.Properties.Contains(
PropertyManager
.ForestFunctionality))
772
forestModeValue = int.Parse((string)rootDSE.Properties[
PropertyManager
.ForestFunctionality].Value!, NumberFormatInfo.InvariantInfo);
816
dcName = Utils.GetDnsHostNameFromNTDSA(_context, (string)
PropertyManager
.GetPropertyValue(_context, entry,
PropertyManager
.FsmoRoleOwner)!);
935
str.Append(
PropertyManager
.ObjectCategory);
937
str.Append(
PropertyManager
.SystemFlags);
941
str.Append(
PropertyManager
.SystemFlags);
948
propertiesToLoad[0] =
PropertyManager
.DnsRoot;
949
propertiesToLoad[1] =
PropertyManager
.NCName;
964
string nCName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.NCName)!;
970
string dnsName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsRoot)!;
972
appNCs.Add(new ApplicationPartition(appNCContext, nCName, (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsRoot)!, ApplicationPartitionType.ADApplicationPartition, new DirectoryEntryManager(appNCContext)));
1002
str.Append(
PropertyManager
.ObjectCategory);
1004
str.Append(
PropertyManager
.SystemFlags);
1008
str.Append(
PropertyManager
.SystemFlags);
1015
propertiesToLoad[0] =
PropertyManager
.DnsRoot;
1025
string domainName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsRoot)!;
System\DirectoryServices\ActiveDirectory\GlobalCatalog.cs (7)
65
gcDnsName = (string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.DnsHostName)!;
66
isGlobalCatalog = (bool)bool.Parse((string)
PropertyManager
.GetPropertyValue(context, rootDSE,
PropertyManager
.IsGlobalCatalogReady)!);
192
if (serverNtdsaEntry.Properties[
PropertyManager
.Options].Value != null)
194
options = (int)serverNtdsaEntry.Properties[
PropertyManager
.Options].Value!;
197
serverNtdsaEntry.Properties[
PropertyManager
.Options].Value = options & (~1);
System\DirectoryServices\ActiveDirectory\PropertyManager.cs (2)
124
if (directoryEntry.Properties[
PropertyManager
.DistinguishedName].Count != 0)
126
throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFoundOnObject, propertyName, directoryEntry.Properties[
PropertyManager
.DistinguishedName].Value));
System\DirectoryServices\ActiveDirectory\ReadOnlySiteCollection.cs (8)
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);
System\DirectoryServices\ActiveDirectory\ReadOnlySiteLinkBridgeCollection.cs (8)
22
string? dn = (string?)
PropertyManager
.GetPropertyValue(bridge.context, bridge.cachedEntry!,
PropertyManager
.DistinguishedName);
27
string? tmpDn = (string?)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry!,
PropertyManager
.DistinguishedName);
42
string? dn = (string?)
PropertyManager
.GetPropertyValue(bridge.context, bridge.cachedEntry!,
PropertyManager
.DistinguishedName);
47
string? tmpDn = (string?)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry!,
PropertyManager
.DistinguishedName);
System\DirectoryServices\ActiveDirectory\ReadOnlySiteLinkCollection.cs (8)
22
string? dn = (string?)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName);
27
string? tmpDn = (string?)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName);
42
string? dn = (string?)
PropertyManager
.GetPropertyValue(link.context, link.cachedEntry,
PropertyManager
.DistinguishedName);
47
string? tmpDn = (string?)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedEntry,
PropertyManager
.DistinguishedName);
System\DirectoryServices\ActiveDirectory\ReplicationConnection.cs (30)
50
string serverDN = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ServerName)!;
139
string serverDN = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ServerName)!;
153
string serverName = (string)
PropertyManager
.GetPropertyValue(sourceServerContext, de,
PropertyManager
.ServerName)!;
246
string sourceServerDN = (string)
PropertyManager
.GetPropertyValue(context, cachedDirectoryEntry,
PropertyManager
.FromServer)!;
250
int portnumber = (int)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.MsDSPortLDAP)!;
251
string? tmpServerName = (string?)
PropertyManager
.GetPropertyValue(context, de.Parent,
PropertyManager
.DnsHostName);
259
_sourceServerName = (string?)
PropertyManager
.GetPropertyValue(context, de.Parent,
PropertyManager
.DnsHostName);
287
string hostName = (string)
PropertyManager
.GetPropertyValue(context, serverObject,
PropertyManager
.DnsHostName)!;
290
int portnumber = (int)
PropertyManager
.GetPropertyValue(context, NTDSObject,
PropertyManager
.MsDSPortLDAP)!;
751
string destinationPath = (string)
PropertyManager
.GetPropertyValue(context, cachedDirectoryEntry,
PropertyManager
.FromServer)!;
755
string serverDN = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.ServerName)!;
960
string? targetRoot = (string?)
PropertyManager
.GetPropertyValue(context, targetDE,
PropertyManager
.RootDomainNamingContext);
961
string? sourceRoot = (string?)
PropertyManager
.GetPropertyValue(sourceServer.Context, sourceDE,
PropertyManager
.RootDomainNamingContext);
969
string? targetRoot = (string?)
PropertyManager
.GetPropertyValue(context, targetDE,
PropertyManager
.ConfigurationNamingContext);
970
string? sourceRoot = (string?)
PropertyManager
.GetPropertyValue(sourceServer.Context, sourceDE,
PropertyManager
.ConfigurationNamingContext);
System\DirectoryServices\ActiveDirectory\ReplicationConnectionCollection.cs (8)
22
string? dn = (string?)
PropertyManager
.GetPropertyValue(connection.context, connection.cachedDirectoryEntry,
PropertyManager
.DistinguishedName);
27
string? tmpDn = (string?)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedDirectoryEntry,
PropertyManager
.DistinguishedName);
45
string? dn = (string?)
PropertyManager
.GetPropertyValue(connection.context, connection.cachedDirectoryEntry,
PropertyManager
.DistinguishedName);
50
string? tmpDn = (string?)
PropertyManager
.GetPropertyValue(tmp.context, tmp.cachedDirectoryEntry,
PropertyManager
.DistinguishedName);
System\DirectoryServices\ActiveDirectory\Utils.cs (130)
289
dcName = (string)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.DnsHostName)!;
309
string filter = "(|(&(" +
PropertyManager
.ObjectCategory + "=server)(" +
PropertyManager
.DistinguishedName + "=" + GetEscapedFilterValue(serverDn) + "))" +
310
"(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.DistinguishedName + "=" + GetEscapedFilterValue(ntdsaDn) + ")))";
312
propertiesToLoad[0] =
PropertyManager
.DnsHostName;
313
propertiesToLoad[1] =
PropertyManager
.MsDSPortLDAP;
314
propertiesToLoad[2] =
PropertyManager
.ObjectCategory;
328
string objectCategoryValue = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.ObjectCategory)!;
332
ldapPort = (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortLDAP)!;
337
dnsHostName = (string?)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsHostName);
367
string filter = "(|(&(" +
PropertyManager
.ObjectCategory + "=server)(" +
PropertyManager
.DistinguishedName + "=" + GetEscapedFilterValue(serverDn) + "))" +
368
"(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.DistinguishedName + "=" + GetEscapedFilterValue(ntdsaDn) + ")))";
370
propertiesToLoad[0] =
PropertyManager
.DnsHostName;
371
propertiesToLoad[1] =
PropertyManager
.MsDSPortLDAP;
372
propertiesToLoad[2] =
PropertyManager
.MsDSPortSSL;
373
propertiesToLoad[3] =
PropertyManager
.ObjectCategory;
387
string objectCategoryValue = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.ObjectCategory)!;
391
ldapPort = (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortLDAP)!;
392
sslPort = (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortSSL)!;
397
dnsHostName = (string?)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsHostName);
734
foreach (string supportedCapability in rootDSE.Properties[
PropertyManager
.SupportedCapabilities])
745
foreach (string supportedCapability in rootDSE.Properties[
PropertyManager
.SupportedCapabilities])
756
foreach (string supportedCapability in rootDSE.Properties[
PropertyManager
.SupportedCapabilities])
777
str.Append(
PropertyManager
.ObjectCategory);
779
str.Append(
PropertyManager
.SystemFlags);
783
str.Append(
PropertyManager
.SystemFlags);
787
str.Append(
PropertyManager
.NCName);
795
propertiesToLoad[0] =
PropertyManager
.DistinguishedName;
816
_ = (string?)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DistinguishedName);
907
originatingServerName = (string?)
PropertyManager
.GetPropertyValue(server.Context, srvEntry,
PropertyManager
.DnsHostName);
921
originatingServerName = (string?)
PropertyManager
.GetPropertyValue(de.Parent,
PropertyManager
.DnsHostName);
933
int portnumber = (int)
PropertyManager
.GetPropertyValue(server.Context, de,
PropertyManager
.MsDSPortLDAP)!;
1043
string? namingContext = (string?)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.DefaultNamingContext);
1044
string? rootNamingContext = (string?)
PropertyManager
.GetPropertyValue(context, de,
PropertyManager
.RootDomainNamingContext);
1276
fsmoRoleOwnerName = Utils.GetAdamDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, partitionsEntry,
PropertyManager
.FsmoRoleOwner)!);
1280
fsmoRoleOwnerName = Utils.GetDnsHostNameFromNTDSA(context, (string)
PropertyManager
.GetPropertyValue(context, partitionsEntry,
PropertyManager
.FsmoRoleOwner)!);
1288
string filter = "(&(" +
PropertyManager
.ObjectCategory + "=crossRef)(" +
PropertyManager
.NCName + "=" + Utils.GetEscapedFilterValue(partitionName!) + "))";
1290
propertyNames.Add(
PropertyManager
.MsDSNCReplicaLocations);
1291
propertyNames.Add(
PropertyManager
.MsDSNCROReplicaLocations);
1309
ArrayList replicaLocations = (ArrayList)values[
PropertyManager
.MsDSNCReplicaLocations.ToLowerInvariant()]!;
1310
ArrayList roReplicaLocations = (ArrayList)values[
PropertyManager
.MsDSNCROReplicaLocations.ToLowerInvariant()]!;
1322
ntdsaFilter.Append(
PropertyManager
.DistinguishedName);
1328
serverFilter.Append(
PropertyManager
.DistinguishedName);
1337
roNtdsaFilter.Append(
PropertyManager
.DistinguishedName);
1343
roServerFilter.Append(
PropertyManager
.DistinguishedName);
1388
filter2 = "(|(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.HasMasterNCs +
1389
"=" + Utils.GetEscapedFilterValue(partitionName) + "))(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSARO)(" +
1390
PropertyManager
.MsDSHasFullReplicaNCs + "=" + Utils.GetEscapedFilterValue(partitionName) + "))(" +
1391
PropertyManager
.ObjectCategory + "=server))";
1397
filter2 = "(|(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
1398
PropertyManager
.Options + ":1.2.840.113556.1.4.804:=1))(&(" +
1399
PropertyManager
.ObjectCategory + "=nTDSDSARO)(" +
1400
PropertyManager
.Options + ":1.2.840.113556.1.4.804:=1))(" +
1401
PropertyManager
.ObjectCategory + "=server))";
1405
filter2 = "(|" + "(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
1406
PropertyManager
.ObjectCategory + "=nTDSDSARO)(" +
1407
PropertyManager
.ObjectCategory + "=server))";
1422
filter2 = "(|(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.Options +
1423
":1.2.840.113556.1.4.804:=1)(" +
PropertyManager
.MsDSHasMasterNCs + "=" + Utils.GetEscapedFilterValue(partitionName) +
1424
")(|" + ntdsaFilter.ToString() + "))" + "(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSARO)(" +
PropertyManager
.Options +
1426
"(&(" +
PropertyManager
.ObjectCategory + "=server)(|" + serverFilter.ToString() + "))" +
1427
"(&(" +
PropertyManager
.ObjectCategory + "=server)(|" + roServerFilter.ToString() + ")))";
1431
filter2 = "(|(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.Options +
1432
":1.2.840.113556.1.4.804:=1)(" +
PropertyManager
.MsDSHasMasterNCs + "=" + Utils.GetEscapedFilterValue(partitionName) +
1433
")(|" + ntdsaFilter.ToString() + "))" + "(&(" +
PropertyManager
.ObjectCategory + "=server)(|" + serverFilter.ToString() + ")))";
1443
filter2 = "(|(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.MsDSHasMasterNCs + "=" + Utils.GetEscapedFilterValue(partitionName) + ")(|" + ntdsaFilter.ToString() + "))"
1444
+ "(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSARO)(|" + roNtdsaFilter.ToString() + "))"
1445
+ "(&(" +
PropertyManager
.ObjectCategory + "=server)(|" + serverFilter.ToString() + "))"
1446
+ "(&(" +
PropertyManager
.ObjectCategory + "=server)(|" + roServerFilter.ToString() + ")))";
1450
filter2 = "(|(&(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)(" +
PropertyManager
.MsDSHasMasterNCs + "=" + Utils.GetEscapedFilterValue(partitionName) + ")(|" + ntdsaFilter.ToString() + "))"
1451
+ "(&(" +
PropertyManager
.ObjectCategory + "=server)(|" + serverFilter.ToString() + ")))";
1462
string propertyWithRangeInfo =
PropertyManager
.MsDSHasInstantiatedNCs + ";range=0-*";
1463
searcher2.PropertiesToLoad.Add(
PropertyManager
.DistinguishedName);
1464
searcher2.PropertiesToLoad.Add(
PropertyManager
.DnsHostName);
1466
searcher2.PropertiesToLoad.Add(
PropertyManager
.ObjectCategory);
1469
searcher2.PropertiesToLoad.Add(
PropertyManager
.MsDSPortLDAP);
1483
string objectCategory = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.ObjectCategory)!;
1489
string ntdsaName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DistinguishedName)!;
1500
serverPorts.Add(ntdsaName, (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortLDAP)!);
1514
if ((property.Length >=
PropertyManager
.MsDSHasInstantiatedNCs.Length) && (Utils.Compare(property, 0,
PropertyManager
.MsDSHasInstantiatedNCs.Length,
PropertyManager
.MsDSHasInstantiatedNCs, 0,
PropertyManager
.MsDSHasInstantiatedNCs.Length) == 0))
1551
serverPorts.Add(ntdsaName, (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortLDAP)!);
1573
serverPorts.Add(ntdsaName, (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortLDAP)!);
1581
if (res.Properties.Contains(
PropertyManager
.DnsHostName))
1583
serverNames.Add("CN=NTDS Settings," + (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DistinguishedName)!,
1584
(string?)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DnsHostName));
1614
str.Append(
PropertyManager
.NCName);
1629
searcher2.Filter = "(&" + "(" +
PropertyManager
.ObjectCategory + "=nTDSDSA)" + str.ToString() + ")";
1631
string propertyWithRangeInfo2 =
PropertyManager
.MsDSHasInstantiatedNCs + ";range=" + rangeStart + "-*";
1634
searcher2.PropertiesToLoad.Add(
PropertyManager
.DistinguishedName);
1642
string ntdsaName = (string)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.DistinguishedName)!;
1651
if (property.AsSpan().StartsWith(
PropertyManager
.MsDSHasInstantiatedNCs, StringComparison.OrdinalIgnoreCase))
1685
serverPorts.Add(ntdsaName, (int)
PropertyManager
.GetSearchResultPropertyValue(res,
PropertyManager
.MsDSPortLDAP)!);