117 references to TrustDirection
System.DirectoryServices (113)
System\DirectoryServices\ActiveDirectory\Domain.cs (46)
611
TrustHelper.VerifyTrust(context, Name, targetDomainName, false/*not forest*/,
TrustDirection
.Outbound, false/*just TC verification*/, null /* no need to go to specific server*/);
614
public void VerifyTrustRelationship(Domain targetDomain,
TrustDirection
direction)
621
if (direction <
TrustDirection
.Inbound || direction >
TrustDirection
.Bidirectional)
622
throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(
TrustDirection
));
625
if ((direction &
TrustDirection
.Outbound) != 0)
629
TrustHelper.VerifyTrust(context, Name, targetDomain.Name, false/*not forest*/,
TrustDirection
.Outbound, false/*just TC verification*/, null /* no need to go to specific server*/);
638
if ((direction &
TrustDirection
.Inbound) != 0)
642
TrustHelper.VerifyTrust(targetDomain.GetDirectoryContext(), targetDomain.Name, Name, false/*not forest*/,
TrustDirection
.Outbound, false/*just TC verification*/, null /* no need to go to specific server*/);
651
public void CreateLocalSideOfTrustRelationship(string targetDomainName,
TrustDirection
direction, string trustPassword)
661
if (direction <
TrustDirection
.Inbound || direction >
TrustDirection
.Bidirectional)
662
throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(
TrustDirection
));
678
public void CreateTrustRelationship(Domain targetDomain,
TrustDirection
direction)
685
if (direction <
TrustDirection
.Inbound || direction >
TrustDirection
.Bidirectional)
686
throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(
TrustDirection
));
695
if ((direction &
TrustDirection
.Inbound) != 0)
696
reverseDirection |= (int)
TrustDirection
.Outbound;
697
if ((direction &
TrustDirection
.Outbound) != 0)
698
reverseDirection |= (int)
TrustDirection
.Inbound;
700
TrustHelper.CreateTrust(targetDomain.GetDirectoryContext(), targetDomain.Name, context, Name, false, (
TrustDirection
)reverseDirection, password);
722
public void UpdateLocalSideOfTrustRelationship(string targetDomainName,
TrustDirection
newTrustDirection, string newTrustPassword)
732
if (newTrustDirection <
TrustDirection
.Inbound || newTrustDirection >
TrustDirection
.Bidirectional)
733
throw new InvalidEnumArgumentException(nameof(newTrustDirection), (int)newTrustDirection, typeof(
TrustDirection
));
744
public void UpdateTrustRelationship(Domain targetDomain,
TrustDirection
newTrustDirection)
751
if (newTrustDirection <
TrustDirection
.Inbound || newTrustDirection >
TrustDirection
.Bidirectional)
752
throw new InvalidEnumArgumentException(nameof(newTrustDirection), (int)newTrustDirection, typeof(
TrustDirection
));
760
TrustDirection
reverseDirection = 0;
761
if ((newTrustDirection &
TrustDirection
.Inbound) != 0)
762
reverseDirection |=
TrustDirection
.Outbound;
763
if ((newTrustDirection &
TrustDirection
.Outbound) != 0)
764
reverseDirection |=
TrustDirection
.Inbound;
771
TrustDirection
direction =
TrustDirection
.Bidirectional;
784
if ((direction &
TrustDirection
.Outbound) != 0)
786
TrustHelper.VerifyTrust(context, Name, targetDomain.Name, false /*not forest*/,
TrustDirection
.Outbound, true /*reset secure channel*/, null /* no need to go to specific server*/);
790
if ((direction &
TrustDirection
.Inbound) != 0)
792
TrustHelper.VerifyTrust(targetDomain.GetDirectoryContext(), targetDomain.Name, Name, false /*not forest*/,
TrustDirection
.Outbound, true/*reset secure channel*/, null /* no need to go to specific server*/);
1429
private void RepairTrustHelper(Domain targetDomain,
TrustDirection
direction)
1443
if ((direction &
TrustDirection
.Outbound) != 0)
1447
TrustHelper.VerifyTrust(context, Name, targetDomain.Name, false /*not forest*/,
TrustDirection
.Outbound, true /*reset secure channel*/, targetServerName /* need to specify which target server */);
1456
if ((direction &
TrustDirection
.Inbound) != 0)
1460
TrustHelper.VerifyTrust(targetDomain.GetDirectoryContext(), targetDomain.Name, Name, false /*not forest*/,
TrustDirection
.Outbound, true/*reset secure channel*/, sourceServerName /* need to specify which target server */);
System\DirectoryServices\ActiveDirectory\Forest.cs (46)
423
TrustHelper.VerifyTrust(_context, Name, targetForestName, true/*forest*/,
TrustDirection
.Outbound, false /*just TC verification*/, null /* no need to go to specific server*/);
426
public void VerifyTrustRelationship(Forest targetForest,
TrustDirection
direction)
433
if (direction <
TrustDirection
.Inbound || direction >
TrustDirection
.Bidirectional)
434
throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(
TrustDirection
));
437
if ((direction &
TrustDirection
.Outbound) != 0)
441
TrustHelper.VerifyTrust(_context, Name, targetForest.Name, true/*forest*/,
TrustDirection
.Outbound, false/*just TC verification*/, null /* no need to go to specific server*/);
450
if ((direction &
TrustDirection
.Inbound) != 0)
454
TrustHelper.VerifyTrust(targetForest.GetDirectoryContext(), targetForest.Name, Name, true/*forest*/,
TrustDirection
.Outbound, false/*just TC verification*/, null /* no need to go to specific server*/);
463
public void CreateLocalSideOfTrustRelationship(string targetForestName,
TrustDirection
direction, string trustPassword)
473
if (direction <
TrustDirection
.Inbound || direction >
TrustDirection
.Bidirectional)
474
throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(
TrustDirection
));
490
public void CreateTrustRelationship(Forest targetForest,
TrustDirection
direction)
497
if (direction <
TrustDirection
.Inbound || direction >
TrustDirection
.Bidirectional)
498
throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(
TrustDirection
));
507
if ((direction &
TrustDirection
.Inbound) != 0)
508
reverseDirection |= (int)
TrustDirection
.Outbound;
509
if ((direction &
TrustDirection
.Outbound) != 0)
510
reverseDirection |= (int)
TrustDirection
.Inbound;
512
TrustHelper.CreateTrust(targetForest.GetDirectoryContext(), targetForest.Name, _context, Name, true, (
TrustDirection
)reverseDirection, password);
534
public void UpdateLocalSideOfTrustRelationship(string targetForestName,
TrustDirection
newTrustDirection, string newTrustPassword)
544
if (newTrustDirection <
TrustDirection
.Inbound || newTrustDirection >
TrustDirection
.Bidirectional)
545
throw new InvalidEnumArgumentException(nameof(newTrustDirection), (int)newTrustDirection, typeof(
TrustDirection
));
556
public void UpdateTrustRelationship(Forest targetForest,
TrustDirection
newTrustDirection)
563
if (newTrustDirection <
TrustDirection
.Inbound || newTrustDirection >
TrustDirection
.Bidirectional)
564
throw new InvalidEnumArgumentException(nameof(newTrustDirection), (int)newTrustDirection, typeof(
TrustDirection
));
572
TrustDirection
reverseDirection = 0;
573
if ((newTrustDirection &
TrustDirection
.Inbound) != 0)
574
reverseDirection |=
TrustDirection
.Outbound;
575
if ((newTrustDirection &
TrustDirection
.Outbound) != 0)
576
reverseDirection |=
TrustDirection
.Inbound;
583
TrustDirection
direction =
TrustDirection
.Bidirectional;
595
if ((direction &
TrustDirection
.Outbound) != 0)
597
TrustHelper.VerifyTrust(_context, Name, targetForest.Name, true /*is forest*/,
TrustDirection
.Outbound, true/*reset secure channel*/, null /* no need to go to specific server*/);
601
if ((direction &
TrustDirection
.Inbound) != 0)
603
TrustHelper.VerifyTrust(targetForest.GetDirectoryContext(), targetForest.Name, Name, true/*is forest*/,
TrustDirection
.Outbound, true/*reset secure channel*/, null /* no need to go to specific server*/);
1153
private void RepairTrustHelper(Forest targetForest,
TrustDirection
direction)
1167
if ((direction &
TrustDirection
.Outbound) != 0)
1171
TrustHelper.VerifyTrust(_context, Name, targetForest.Name, true /*is forest*/,
TrustDirection
.Outbound, true/*reset secure channel*/, targetServerName /* need to specify which target server */);
1180
if ((direction &
TrustDirection
.Inbound) != 0)
1184
TrustHelper.VerifyTrust(targetForest.GetDirectoryContext(), targetForest.Name, Name, true/*is forest*/,
TrustDirection
.Outbound, true/*reset secure channel*/, sourceServerName /* need to specify which target server */);
System\DirectoryServices\ActiveDirectory\ForestTrustRelationshipInformation.cs (3)
41
direction =
TrustDirection
.Bidirectional;
43
direction =
TrustDirection
.Outbound;
45
direction =
TrustDirection
.Inbound;
System\DirectoryServices\ActiveDirectory\TrustHelper.cs (13)
325
internal static void VerifyTrust(DirectoryContext context, string? sourceName, string? targetName, bool isForest,
TrustDirection
direction, bool forceSecureChannelReset, string? preferredTargetServer)
438
internal static void CreateTrust(DirectoryContext sourceContext, string? sourceName, DirectoryContext targetContext, string? targetName, bool isForest,
TrustDirection
direction, string password)
479
if ((direction &
TrustDirection
.Inbound) != 0)
486
if ((direction &
TrustDirection
.Outbound) != 0)
565
TrustDirection
direction;
609
direction = (
TrustDirection
)domainInfo.Information!.TrustDirection;
632
if ((direction &
TrustDirection
.Inbound) != 0)
639
if ((direction &
TrustDirection
.Outbound) != 0)
686
internal static unsafe void UpdateTrustDirection(DirectoryContext context, string? sourceName, string? targetName, string password, bool isForest,
TrustDirection
newTrustDirection)
758
if ((newTrustDirection &
TrustDirection
.Inbound) != 0)
771
if ((newTrustDirection &
TrustDirection
.Outbound) != 0)
863
throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, sourceName, targetName, (
TrustDirection
)direction), typeof(ForestTrustRelationshipInformation), null);
865
throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, sourceName, targetName, (
TrustDirection
)direction), typeof(TrustRelationshipInformation), null);
System\DirectoryServices\ActiveDirectory\TrustRelationshipInformation.cs (5)
29
internal
TrustDirection
direction;
45
direction =
TrustDirection
.Bidirectional;
47
direction =
TrustDirection
.Outbound;
49
direction =
TrustDirection
.Inbound;
60
public
TrustDirection
TrustDirection => direction;
System.DirectoryServices.AccountManagement (4)
System\DirectoryServices\AccountManagement\AD\ADUtils.cs (4)
465
if (
TrustDirection
.Outbound == TRI.TrustDirection ||
TrustDirection
.Bidirectional == TRI.TrustDirection)
483
if (
TrustDirection
.Outbound == FTC.TrustDirection ||
TrustDirection
.Bidirectional == FTC.TrustDirection)