396 references to CommunicationState
Binding.ReliableSession.IntegrationTests (2)
NetHttpBindingTests.cs (1)
245Assert.Equal(CommunicationState.Faulted, ((ICommunicationObject)serviceProxy).State);
WSHttpBindingTests.cs (1)
245Assert.Equal(CommunicationState.Faulted, ((ICommunicationObject)serviceProxy).State);
Binding.UDS.IntegrationTests (2)
ServiceHelper.cs (2)
100if (comObj.State == System.ServiceModel.CommunicationState.Opened) 105if (comObj.State != System.ServiceModel.CommunicationState.Closed)
Client.ClientBase.IntegrationTests (38)
ChannelBaseTests.4.0.0.cs (3)
245Assert.True(CommunicationState.Closed == client.State, 249Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 253Assert.True(CommunicationState.Closed == factory.State,
ClientBaseTests.4.0.0.cs (35)
167Assert.Equal(CommunicationState.Created, client.State); 171Assert.Equal(CommunicationState.Opened, client.State); 176Assert.Equal(CommunicationState.Opened, client.State); 182Assert.Equal(CommunicationState.Closed, client.State); 191Assert.Equal(CommunicationState.Closed, client.State); 219Assert.True(CommunicationState.Created == client.State, 222Assert.True(CommunicationState.Created == factory.State, 241Assert.True(CommunicationState.Opened == client.State, 244Assert.True(CommunicationState.Opened == factory.State, 247Assert.True(CommunicationState.Opened == ((ICommunicationObject)serviceProxy).State, 256Assert.True(CommunicationState.Closed == client.State, 260Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 264Assert.True(CommunicationState.Closed == factory.State, 294Assert.True(CommunicationState.Created == client.State, 297Assert.True(CommunicationState.Created == factory.State, 317Assert.True(CommunicationState.Opened == client.State, 320Assert.True(CommunicationState.Opened == factory.State, 323Assert.True(CommunicationState.Opened == ((ICommunicationObject)serviceProxy).State, 333Assert.True(CommunicationState.Closed == client.State, 337Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 341Assert.True(CommunicationState.Closed == factory.State, 373Assert.True(CommunicationState.Created == client.State, 376Assert.True(CommunicationState.Created == factory.State, 396Assert.True(CommunicationState.Opened == client.State, 399Assert.True(CommunicationState.Opened == factory.State, 402Assert.True(CommunicationState.Opened == ((ICommunicationObject)serviceProxy).State, 412Assert.True(CommunicationState.Closed == client.State, 416Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 420Assert.True(CommunicationState.Closed == factory.State, 462Assert.True(CommunicationState.Closed == client.State, 466Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 470Assert.True(CommunicationState.Closed == factory.State, 513Assert.True(CommunicationState.Closed == client.State, 517Assert.True(CommunicationState.Closed == ((ICommunicationObject)serviceProxy).State, 521Assert.True(CommunicationState.Closed == factory.State,
Client.TypedClient.IntegrationTests (2)
TypedProxyDuplexTests.4.1.0.cs (2)
49if (factory != null && factory.State != CommunicationState.Closed) 84if (factory != null && factory.State != CommunicationState.Closed)
Contract.Service.IntegrationTests (13)
ServiceContractTests.4.0.0.cs (4)
311Assert.True(factory.State == CommunicationState.Opened, 365Assert.True(proxyAsCommunicationObject.State == CommunicationState.Opened, 420Assert.True(factory.State == CommunicationState.Closed, 469Assert.True(proxyAsCommunicationObject.State == CommunicationState.Closed,
ServiceContractTests.4.1.0.cs (9)
702Assert.True(factory.State == CommunicationState.Closed, 742Assert.True(((ICommunicationObject)serviceProxy1).State == CommunicationState.Closed, 744Assert.True(((ICommunicationObject)serviceProxy2).State == CommunicationState.Closed, 792Assert.True(factory.State == CommunicationState.Closed, 832Assert.True(((ICommunicationObject)serviceProxy1).State == CommunicationState.Closed, 834Assert.True(((ICommunicationObject)serviceProxy2).State == CommunicationState.Closed, 883Assert.True(factory.State == CommunicationState.Closed, 923Assert.True(((ICommunicationObject)serviceProxy1).State == CommunicationState.Closed, 925Assert.True(((ICommunicationObject)serviceProxy2).State == CommunicationState.Closed,
Infrastructure.Common (2)
ServiceUtilHelper.cs (2)
431if (comObj.State == CommunicationState.Opened) 436if (comObj.State != CommunicationState.Closed)
ScenarioTests.Common.Tests (2)
ScenarioTestHelpers.cs (2)
195if (comObj.State == CommunicationState.Opened) 200if (comObj.State != CommunicationState.Closed)
System.ServiceModel.Federation (5)
System\ServiceModel\Federation\WSTrustChannel.cs (2)
31if (requestChannel.State != CommunicationState.Created) 344CommunicationState ICommunicationObject.State
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (3)
456if (ChannelFactory != null && ChannelFactory.State == CommunicationState.Opened) 465if (ChannelFactory != null && ChannelFactory.State == CommunicationState.Opened) 536CommunicationState ICommunicationObject.State
System.ServiceModel.Http (2)
System\ServiceModel\Channels\HttpChannelFactory.cs (2)
806if (State == CommunicationState.Created) 1012if (_channel.State != CommunicationState.Opened)
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\FramingChannels.cs (1)
325if (State != CommunicationState.Opening)
System.ServiceModel.Primitives (247)
System\ServiceModel\ChannelFactory.cs (10)
37if (State == CommunicationState.Created || State == CommunicationState.Opening) 101if (State != CommunicationState.Opened) 105if (State != CommunicationState.Opened) 150if (State == CommunicationState.Opened) 155if (State != CommunicationState.Closed) 172Fx.Assert(State == CommunicationState.Created || State == CommunicationState.Opening, ""); 181Fx.Assert(State == CommunicationState.Created || State == CommunicationState.Opening, "");
System\ServiceModel\Channels\ChannelFactoryBase.cs (1)
161if (State != CommunicationState.Opened)
System\ServiceModel\Channels\ChannelParameterCollection.cs (14)
76CommunicationState state = channel.State; 81case CommunicationState.Created: 84case CommunicationState.Opening: 85case CommunicationState.Opened: 86case CommunicationState.Closing: 87case CommunicationState.Closed: 88case CommunicationState.Faulted: 111CommunicationState state = channel.State; 116case CommunicationState.Created: 121case CommunicationState.Opening: 122case CommunicationState.Opened: 123case CommunicationState.Closing: 124case CommunicationState.Closed: 125case CommunicationState.Faulted:
System\ServiceModel\Channels\ChannelReliableSession.cs (6)
87if ((_binder.State == CommunicationState.Opened) 164Channel.State == CommunicationState.Faulted || 165Channel.State == CommunicationState.Closed) 196Channel.State == CommunicationState.Faulted || 197Channel.State == CommunicationState.Closed) 238if ((_binder.State == CommunicationState.Opened)
System\ServiceModel\Channels\ClientReliableChannelBinder.cs (6)
202CommunicationState currentState = State; 205if ((currentState == CommunicationState.Created) 206|| (currentState == CommunicationState.Opening) 207|| (currentState == CommunicationState.Opened)) 406if (State == CommunicationState.Created) 411if (State == CommunicationState.Opening)
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (19)
276if (Aborted || State == CommunicationState.Faulted) 318else if (State == CommunicationState.Closing) 654if (State == CommunicationState.Closing 655|| State == CommunicationState.Closed 656|| State == CommunicationState.Faulted) 685if (State == CommunicationState.Opening || 686State == CommunicationState.Opened || 687State == CommunicationState.Closing) 702if (State == CommunicationState.Opening || 703State == CommunicationState.Opened || 704State == CommunicationState.Closing) 757if ((State != CommunicationState.Opened) 947if (!terminated && (Binder.State == CommunicationState.Opened)) 1038if (State == CommunicationState.Opened) 1040else if (State == CommunicationState.Faulted) 1130if ((State == CommunicationState.Opened || State == CommunicationState.Closing) && 1186if ((channel.State == CommunicationState.Opened || channel.State == CommunicationState.Closing) &&
System\ServiceModel\Channels\CommunicationObject.cs (81)
26private CommunicationState _state; 43_state = CommunicationState.Created; 101get { return _state == CommunicationState.Closed; } 104public CommunicationState State 159if (Aborted || _state == CommunicationState.Closed) 166_state = CommunicationState.Closing; 237CommunicationState originalState; 241if (originalState != CommunicationState.Closed) 243_state = CommunicationState.Closing; 251case CommunicationState.Created: 252case CommunicationState.Opening: 253case CommunicationState.Faulted: 255if (originalState == CommunicationState.Faulted) 261case CommunicationState.Opened: 294case CommunicationState.Closing: 295case CommunicationState.Closed: 376case CommunicationState.Created: 379case CommunicationState.Opening: 382case CommunicationState.Opened: 385case CommunicationState.Closing: 388case CommunicationState.Closed: 391case CommunicationState.Faulted: 413if (_state == CommunicationState.Closed || _state == CommunicationState.Closing) 418if (_state == CommunicationState.Faulted) 423_state = CommunicationState.Faulted; 450CommunicationState currentState = _state; 452Fx.Assert(currentState == CommunicationState.Closing || currentState == CommunicationState.Closed || currentState == CommunicationState.Faulted, 478case CommunicationState.Closing: 479case CommunicationState.Closed: 482case CommunicationState.Faulted: 517_state = CommunicationState.Opening; 593_state = CommunicationState.Closed; 687if (Aborted || _state != CommunicationState.Opening) 692_state = CommunicationState.Opened; 745case CommunicationState.Created: 748case CommunicationState.Opening: 751case CommunicationState.Opened: 754case CommunicationState.Closing: 757case CommunicationState.Closed: 760case CommunicationState.Faulted: 794case CommunicationState.Created: 797case CommunicationState.Opening: 800case CommunicationState.Opened: 803case CommunicationState.Closing: 806case CommunicationState.Closed: 809case CommunicationState.Faulted: 828case CommunicationState.Created: 831case CommunicationState.Opening: 834case CommunicationState.Opened: 837case CommunicationState.Closing: 840case CommunicationState.Closed: 843case CommunicationState.Faulted: 857case CommunicationState.Created: 860case CommunicationState.Opening: 863case CommunicationState.Opened: 866case CommunicationState.Closing: 869case CommunicationState.Closed: 872case CommunicationState.Faulted: 886case CommunicationState.Created: 889case CommunicationState.Opening: 892case CommunicationState.Opened: 895case CommunicationState.Closing: 898case CommunicationState.Closed: 901case CommunicationState.Faulted: 915case CommunicationState.Created: 918case CommunicationState.Opening: 921case CommunicationState.Opened: 924case CommunicationState.Closing: 927case CommunicationState.Closed: 930case CommunicationState.Faulted: 940if (_state == CommunicationState.Created || _state == CommunicationState.Opening) 952case CommunicationState.Created: 955case CommunicationState.Opening: 958case CommunicationState.Opened: 961case CommunicationState.Closing: 964case CommunicationState.Closed: 967case CommunicationState.Faulted:
System\ServiceModel\Channels\IReliableChannelBinder.cs (1)
19CommunicationState State { get; }
System\ServiceModel\Channels\ReliableChannelBinder.cs (40)
111public CommunicationState State { get; private set; } = CommunicationState.Created; 143if (State == CommunicationState.Closed) 148State = CommunicationState.Closing; 181if ((State == CommunicationState.Closing) 182|| (State == CommunicationState.Closed)) 187if (State == CommunicationState.Opened) 189State = CommunicationState.Closing; 200CommunicationState channelState = channel.State; 202if ((channelState == CommunicationState.Created) 203|| (channelState == CommunicationState.Opening) 204|| (channelState == CommunicationState.Faulted)) 208else if ((channelState == CommunicationState.Closing) 209|| (channelState == CommunicationState.Closed)) 323if (State == CommunicationState.Created) 328if ((State == CommunicationState.Faulted) 329|| (State == CommunicationState.Closed)) 334State = CommunicationState.Faulted; 369if (State == CommunicationState.Faulted) 373else if ((State == CommunicationState.Closing) 374|| (State == CommunicationState.Closed)) 495if (State == CommunicationState.Opening) 497State = CommunicationState.Opened; 506if (State != CommunicationState.Created) 510if ((State == CommunicationState.Opening) 511|| (State == CommunicationState.Opened)) 534State = CommunicationState.Opening; 673if (State == CommunicationState.Created) 678if (State == CommunicationState.Opening) 683if (State == CommunicationState.Opened) 716if ((State != CommunicationState.Closing) 717&& (State != CommunicationState.Closed) 718&& (State != CommunicationState.Faulted)) 723State = CommunicationState.Closed; 1069&& (CurrentChannel.State == CommunicationState.Created)) 1263if (CurrentChannel.State != CommunicationState.Faulted) 1332if (CurrentChannel.State == CommunicationState.Faulted) 1372if (channel.State == CommunicationState.Opened) 2073if (lastIteration || channel.State != CommunicationState.Opened) 2148if (lastIteration || channel.State != CommunicationState.Opened)
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (1)
889|| (binder.State != CommunicationState.Opened)
System\ServiceModel\Channels\ReliableOutputSessionChannel.cs (8)
213if (State == CommunicationState.Opening || 214State == CommunicationState.Opened || 215State == CommunicationState.Closing) 230if (State == CommunicationState.Opening || 231State == CommunicationState.Opened || 232State == CommunicationState.Closing) 603if (State == CommunicationState.Faulted) 830if (!Connection.Closed && (Binder.State == CommunicationState.Opened))
System\ServiceModel\Channels\ReliableRequestSessionChannel.cs (7)
144if (State == CommunicationState.Faulted) 222if (State == CommunicationState.Opening || 223State == CommunicationState.Opened || 224State == CommunicationState.Closing) 239if (State == CommunicationState.Opening || 240State == CommunicationState.Opened || 241State == CommunicationState.Closing)
System\ServiceModel\Channels\RequestContextBase.cs (12)
13private CommunicationState _state = CommunicationState.Opened; 28_state = CommunicationState.Opened; 84if (_state == CommunicationState.Closed) 89_state = CommunicationState.Closing; 100_state = CommunicationState.Closed; 119if (_state != CommunicationState.Opened) 129_state = CommunicationState.Closing; 143_state = CommunicationState.Closed; 182if (_state == CommunicationState.Closed || _state == CommunicationState.Closing) 208if ((_state != CommunicationState.Opened) || ReplyInitiated)
System\ServiceModel\Channels\ServiceChannel.cs (8)
62_openBinder = (binder.Channel.State == CommunicationState.Created); 543if ((State == CommunicationState.Created) && !operation.IsInitiating) 835if (State == CommunicationState.Opened) 1146if (State == CommunicationState.Opening) 1613if (State == CommunicationState.Opened) 1618if (State != CommunicationState.Closed) 2509if (!_isTimerCancelled && _binder.Channel.State != CommunicationState.Faulted && _binder.Channel.State != CommunicationState.Closed)
System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
538CommunicationState ICommunicationObject.State
System\ServiceModel\ClientBase.cs (7)
243public CommunicationState State 261return CommunicationState.Created; 457if (State == CommunicationState.Opened) 462if (State != CommunicationState.Closed) 638if (factoryRef.ChannelFactory.State != CommunicationState.Opened) 727Fx.Assert(_channelFactoryRef.ChannelFactory.State == CommunicationState.Opened, 1038CommunicationState ICommunicationObject.State
System\ServiceModel\Dispatcher\ChannelDispatcher.cs (2)
348if (State == CommunicationState.Opened) 359if (State == CommunicationState.Opened)
System\ServiceModel\Dispatcher\ChannelHandler.cs (3)
108if (_listener.State == CommunicationState.Opened) 123get { return Binder.Channel.State == CommunicationState.Opened; } 160if (Binder.Channel.State == CommunicationState.Created)
System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (4)
296if (_channel.State == CommunicationState.Faulted) 412if (_channel.State == CommunicationState.Faulted) 1097public CommunicationState State 1264if (!_closeState.TryBackgroundClose() || State != CommunicationState.Opened)
System\ServiceModel\Dispatcher\InstanceBehavior.cs (2)
55if (rpc.InstanceContext.State == CommunicationState.Created) 59if (rpc.InstanceContext.State == CommunicationState.Created)
System\ServiceModel\Dispatcher\ListenerHandler.cs (3)
121if (_acceptedNull || (listener.State == CommunicationState.Faulted)) 144if (channel.State != CommunicationState.Closing && channel.State != CommunicationState.Closed)
System\ServiceModel\ICommunicationObject.cs (1)
12CommunicationState State { get; }
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (2)
247CommunicationState state = CommunicationObject.State; 248if (state == CommunicationState.Created)
System\ServiceModel\Security\SecuritySessionClientSettings.cs (6)
1113if (State != CommunicationState.Closed) 1172if (State != CommunicationState.Closed) 1288if (State == CommunicationState.Closed) 1659if (State == CommunicationState.Closed || State == CommunicationState.Faulted || IsInputClosed) 1799if (_channel.State != CommunicationState.Closed)
System\ServiceModel\Security\WrapperSecurityCommunicationObject.cs (2)
174public CommunicationState State 336public CommunicationState State
System.ServiceModel.Primitives.Tests (63)
Channels\CommunicationObjectTest.cs (27)
103Assert.True(mco.State == CommunicationState.Closed, 188Assert.True(data.StateAfterCreate == CommunicationState.Created, 192Assert.True(data.StateEnterOnOpening == CommunicationState.Opening, 195Assert.True(data.StateLeaveOnOpening == CommunicationState.Opening, 199Assert.True(data.StateEnterOnOpen == CommunicationState.Opening, 202Assert.True(data.StateLeaveOnOpen == CommunicationState.Opening, 206Assert.True(data.StateEnterOnOpened == CommunicationState.Opening, 209Assert.True(data.StateLeaveOnOpened == CommunicationState.Opened, 213Assert.True(data.StateEnterOnClosing == CommunicationState.Closing, 216Assert.True(data.StateLeaveOnClosing == CommunicationState.Closing, 220Assert.True(data.StateEnterOnClose == CommunicationState.Closing, 223Assert.True(data.StateLeaveOnClose == CommunicationState.Closing, 227Assert.True(data.StateEnterOnClosed == CommunicationState.Closing, 230Assert.True(data.StateLeaveOnClosed == CommunicationState.Closed, 255Assert.True(data.StateAfterCreate == CommunicationState.Created, 259Assert.True(data.StateEnterOnOpening == CommunicationState.Opening, 262Assert.True(data.StateLeaveOnOpening == CommunicationState.Opening, 266Assert.True(data.StateEnterOnBeginOpen == CommunicationState.Opening, 269Assert.True(data.StateLeaveOnBeginOpen == CommunicationState.Opening, 273Assert.True(data.StateEnterOnOpened == CommunicationState.Opening, 276Assert.True(data.StateLeaveOnOpened == CommunicationState.Opened, 280Assert.True(data.StateEnterOnClosing == CommunicationState.Closing, 283Assert.True(data.StateLeaveOnClosing == CommunicationState.Closing, 287Assert.True(data.StateEnterOnBeginClose == CommunicationState.Closing, 290Assert.True(data.StateLeaveOnBeginClose == CommunicationState.Closing, 294Assert.True(data.StateEnterOnClosed == CommunicationState.Closing, 297Assert.True(data.StateLeaveOnClosed == CommunicationState.Closed,
Channels\CustomChannelTest.cs (6)
101Assert.True(factory.State == CommunicationState.Closed, 104Assert.True(((ICommunicationObject)channel).State == CommunicationState.Closed, 198Assert.True(factory.State == CommunicationState.Closed, 201Assert.True(((ICommunicationObject)channel).State == CommunicationState.Closed, 391Assert.True(factory.State == CommunicationState.Closed, 394Assert.True(((ICommunicationObject)channel).State == CommunicationState.Closed,
ServiceModel\ChannelFactoryTest.cs (14)
148Assert.Equal(CommunicationState.Created, factory.State); 154Assert.Equal(CommunicationState.Opened, factory.State); 162Assert.Equal(CommunicationState.Closed, factory.State); 170Assert.Equal(CommunicationState.Closed, factory.State); 174Assert.Equal(CommunicationState.Closed, factory.State); 218Assert.True(CommunicationState.Created == factory.State, 219string.Format("factory.State - Expected: {0}, Actual: {1}.", CommunicationState.Created, factory.State)); 222Assert.True(CommunicationState.Opened == factory.State, 223string.Format("factory.State - Expected: {0}, Actual: {1}.", CommunicationState.Opened, factory.State)); 226Assert.True(CommunicationState.Closed == factory.State, 227string.Format("factory.State - Expected: {0}, Actual: {1}.", CommunicationState.Closed, factory.State)); 231if (factory != null && factory.State != CommunicationState.Closed) 288Assert.Equal(CommunicationState.Closed, factory.State); 317Assert.Equal(CommunicationState.Closed, factory.State);
ServiceModel\ClientBaseTest.cs (10)
23Assert.Equal(CommunicationState.Created, client.State); 25Assert.Equal(CommunicationState.Opened, client.State); 27Assert.Equal(CommunicationState.Closed, client.State); 125Assert.Equal(CommunicationState.Closed, existingChannelFactory.State); 184Assert.Equal(CommunicationState.Created, client.State); 186Assert.Equal(CommunicationState.Opened, client.State); 188Assert.Equal(CommunicationState.Closed, client.State); 202Assert.Equal(CommunicationState.Created, client.State); 204Assert.Equal(CommunicationState.Opened, client.State); 206Assert.Equal(CommunicationState.Closed, client.State);
ServiceModel\DuplexClientBaseTest.cs (6)
24Assert.Equal<CommunicationState>(CommunicationState.Created, duplexClientBase.State); 37Assert.Equal<CommunicationState>(CommunicationState.Created, duplexClientBase.State); 39Assert.Equal<CommunicationState>(CommunicationState.Closed, duplexClientBase.State);
UnitTests.Common (17)
MockCommunicationObject.cs (17)
387public CommunicationState StateAfterCreate { get; set; } 388public CommunicationState StateEnterOnOpening { get; set; } 389public CommunicationState StateLeaveOnOpening { get; set; } 390public CommunicationState StateEnterOnOpen { get; set; } 391public CommunicationState StateLeaveOnOpen { get; set; } 392public CommunicationState StateEnterOnBeginOpen { get; set; } 393public CommunicationState StateLeaveOnBeginOpen { get; set; } 394public CommunicationState StateEnterOnOpened { get; set; } 395public CommunicationState StateLeaveOnOpened { get; set; } 397public CommunicationState StateEnterOnClosing { get; set; } 398public CommunicationState StateLeaveOnClosing { get; set; } 399public CommunicationState StateEnterOnClose { get; set; } 400public CommunicationState StateLeaveOnClose { get; set; } 401public CommunicationState StateEnterOnBeginClose { get; set; } 402public CommunicationState StateLeaveOnBeginClose { get; set; } 403public CommunicationState StateEnterOnClosed { get; set; } 404public CommunicationState StateLeaveOnClosed { get; set; }