Пример #1
0
 /// <summary>
 /// Create a new instance of <see cref="HResult"/>
 /// </summary>
 /// <param name="errorCode"></param>
 public HResult(uint result)
 {
     if (!Enum.IsDefined(typeof(HResultType), result))
     {
         throw new InvalidOperationException($"{result} is not an underlying value of {typeof(HResultType)}");
     }
     Result = (HResultType)result;
 }
Пример #2
0
 /// <summary>
 /// Create a new instance of <see cref="HResult"/>
 /// </summary>
 /// <param name="errorCode"></param>
 public HResult(HResultType result)
 {
     Result = result;
 }