77 references to PeerNeighborState
System.ServiceModel (77)
System\ServiceModel\Channels\IPeerNeighbor.cs (14)
16PeerNeighborState State { get; set; } 22bool TrySetState(PeerNeighborState state); 48public static bool IsSettable(PeerNeighborState state) 51(state == PeerNeighborState.Authenticated) || 52(state == PeerNeighborState.Connecting) || 53(state == PeerNeighborState.Connected) || 54(state == PeerNeighborState.Disconnecting) || 55(state == PeerNeighborState.Disconnected)); 59public static bool IsConnected(PeerNeighborState state) 61return ((state == PeerNeighborState.Connected)); 65public static bool IsAuthenticatedOrClosed(PeerNeighborState state) 67return ((state == PeerNeighborState.Authenticated) || 68(state == PeerNeighborState.Faulted) || 69(state == PeerNeighborState.Closed));
System\ServiceModel\Channels\PeerConnector.cs (21)
123if (state == State.Opened && neighbor.State == PeerNeighborState.Connecting) 221if (neighbor.TrySetState(PeerNeighborState.Disconnected)) 224if (!(neighbor.State >= PeerNeighborState.Disconnected)) 275if (!neighbor.TrySetState(PeerNeighborState.Connecting)) 277if (!(neighbor.State >= PeerNeighborState.Faulted)) 331if (neighbor.IsInitiator || !connectInfo.HasBody() || (neighbor.State != PeerNeighborState.Connecting && 332neighbor.State != PeerNeighborState.Closed)) 374if (!neighbor.TrySetState(PeerNeighborState.Connected)) 375if (!(neighbor.State >= PeerNeighborState.Disconnecting)) 414if (neighbor.State >= PeerNeighborState.Connected) 444if (neighbor.IsInitiator && (neighbor.State == PeerNeighborState.Connecting || 445neighbor.State == PeerNeighborState.Closed)) 473if (!neighbor.IsInitiator || !welcomeInfo.HasBody() || (neighbor.State != PeerNeighborState.Connecting && 474neighbor.State != PeerNeighborState.Closed)) 496if (!neighbor.TrySetState(PeerNeighborState.Connected)) 498if (!(neighbor.State >= PeerNeighborState.Faulted)) 560if (neighbor.State == PeerNeighborState.Connecting && this.state == State.Opened) 585if (neighbor.TrySetState(PeerNeighborState.Disconnecting)) 605if (!(neighbor.State >= PeerNeighborState.Disconnecting)) 689if (neighborToClose.State == PeerNeighborState.Connected) 694neighborToClose.State == PeerNeighborState.Connecting)
System\ServiceModel\Channels\PeerNeighborManager.cs (32)
293neighbor.State < PeerNeighborState.Disconnecting) 352neighbor.State < PeerNeighborState.Disconnecting) 531if (!(neighbor.State == PeerNeighborState.Opened)) 779PeerNeighborState state; // Current state of the neighbor 797this.state = PeerNeighborState.Created; 945public PeerNeighborState State 1142if (this.state < PeerNeighborState.Closed) 1153PeerNeighborState oldState; 1161this.state = PeerNeighborState.Closed; 1175OnStateChanged(PeerNeighborState.Closed); 1197SetState(PeerNeighborState.Opened, SetStateBehavior.TrySet); 1204void OnStateChanged(PeerNeighborState newState) 1209case PeerNeighborState.Opened: 1212case PeerNeighborState.Closed: 1215case PeerNeighborState.Connected: 1218case PeerNeighborState.Disconnecting: 1221case PeerNeighborState.Disconnected: 1240this.state = PeerNeighborState.Created; // reset state if the previous proxy failed 1248bool SetState(PeerNeighborState newState, SetStateBehavior behavior) 1251PeerNeighborState oldState; 1288public bool TrySetState(PeerNeighborState newState) 1299if (this.state == PeerNeighborState.Closed) 1310void ThrowIfInvalidState(PeerNeighborState newState) 1312if (this.state == PeerNeighborState.Closed) 1325public void TraceClosedEvent(PeerNeighborState previousState) 1349PeerNeighborState.Closed.ToString(), previousState.ToString(), null, 1360PeerNeighborState nbrState = this.state; 1366PeerNeighborState nbrState = this.state; 1371string action, PeerNeighborState nbrState, PeerNeighborState previousOrAttemptedState) 1380if (nbrState >= PeerNeighborState.Opened && nbrState <= PeerNeighborState.Connected)
System\ServiceModel\Channels\PeerSecurityHelpers.cs (4)
737if (host.State < PeerNeighborState.Authenticated) 750if (neighbor.State < PeerNeighborState.Authenticated) 821if (this.state != PeerAuthState.Created || neighbor == null || neighbor.IsInitiator || neighbor.State != PeerNeighborState.Opened) 884neighbor.TrySetState(PeerNeighborState.Authenticated);
System\ServiceModel\Channels\PeerSecurityManager.cs (1)
623neighbor.TrySetState(PeerNeighborState.Authenticated);
System\ServiceModel\Channels\PeerService.cs (4)
149if (neighbor == null || neighbor.State == PeerNeighborState.Closed) 163PeerNeighborState state = neighbor.State; 168if (state >= PeerNeighborState.Opened && state <= PeerNeighborState.Connected)
System\ServiceModel\Channels\UtilityExtension.cs (1)
128if (neighbor.State >= PeerNeighborState.Disconnecting)