Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 14, 2023
1 parent 82fcd8a commit 1633f2a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Elmah.Io.HResults/HResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

namespace Elmah.Io.HResults
{
/// <summary>
/// Represents a parsed HResult.
/// </summary>
public class HResult
{
/// <summary>
/// Parse an integer to a HResult. The method will (unless an exception is thrown) always return a result.
/// </summary>
public static HResult Parse(int i)
{
var hresult = new HResult();
Expand All @@ -16,9 +22,24 @@ public static HResult Parse(int i)
return hresult;
}

/// <summary>
/// Indicates if the HResult is a failure or not.
/// </summary>
public bool IsFailure { get; set; }

/// <summary>
/// Identifies the part of the system for which the HResult applies.
/// </summary>
public string? Facility { get; set; }

/// <summary>
/// The parsed Hex code from the HResult.
/// </summary>
public string? Hex { get; set; }

/// <summary>
/// Identifies a particular condition in the context of the facility.
/// </summary>
public string? ErrorCode { get; set; }
}
}

0 comments on commit 1633f2a

Please sign in to comment.