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