System.Net.WebSockets.WebSocketProtocolComponent.Succeeded C# (CSharp) Method

Succeeded() public static method

public static Succeeded ( int hr ) : bool
hr int
return bool
        public static bool Succeeded(int hr)
        {
            return (hr >= 0);
        }

Usage Example

示例#1
0
 // Set the error code only if there is an error (i.e. nativeError >= 0). Otherwise the code ----s up on deserialization
 // as the Exception..ctor() throws on setting HResult to 0. The default for HResult is -2147467259.
 private void SetErrorCodeOnError(int nativeError)
 {
     if (!WebSocketProtocolComponent.Succeeded(nativeError))
     {
         this.HResult = nativeError;
     }
 }
All Usage Examples Of System.Net.WebSockets.WebSocketProtocolComponent::Succeeded