by
0
7
1,211
0
Top 1% !
Popular
Famous
Easy-to-find
Specified
Refined
OpenSource
Popularity: 21355th place

Published on:

InputName0commObj
InputType0ICommunicationObject
LanguageCSharp
LicenseMIT_X11
MethodNameIsValidState
OSWindows
OutputTypebool

IsValidState: Verifies whether the specified communication object is in a valid state. If a communication object is not in a valid state, it needs to be recreated.

<summary>
Verifies whether the specified communication object is in a valid state. If a communication object is not in a valid state, it needs to be recreated.
</summary>
<param name="commObj">The instance of the object implementing the <see cref="System.ServiceModel.ICommunicationObject"/> interface.</param>
<returns>True if the specified communication object is in a valid state, otherwise false.</returns>
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/287928/IsValidState--Verifies-whether-the-speci?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
/// <summary> /// Verifies whether the specified communication object is in a valid state. If a communication object is not in a valid state, it needs to be recreated. /// </summary> /// <param name="commObj">The instance of the object implementing the <see cref="System.ServiceModel.ICommunicationObject"/> interface.</param> /// <returns>True if the specified communication object is in a valid state, otherwise false.</returns> public static bool IsValidState(this ICommunicationObject commObj) { return commObj != null && commObj.State != CommunicationState.Closed && commObj.State != CommunicationState.Closing && commObj.State != CommunicationState.Faulted; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus