Class ResultWithExceptionOctokit<T>
- Namespace
- SunamoOctokit._public
- Assembly
- SunamoOctokit.dll
Wrapper class that holds either a successful result or an exception message from Octokit operations.
public class ResultWithExceptionOctokit<T>
Type Parameters
TThe type of the successful result data.
- Inheritance
-
ResultWithExceptionOctokit<T>
- Inherited Members
- Extension Methods
Constructors
ResultWithExceptionOctokit()
Initializes a new empty instance.
public ResultWithExceptionOctokit()
ResultWithExceptionOctokit(Exception)
Initializes a new instance with an exception object, extracting its message text.
public ResultWithExceptionOctokit(Exception exception)
Parameters
exceptionExceptionThe exception to extract text from.
ResultWithExceptionOctokit(string)
Initializes a new instance with an exception text.
public ResultWithExceptionOctokit(string exceptionText)
Parameters
exceptionTextstringThe exception message text.
ResultWithExceptionOctokit(T)
Initializes a new instance with successful result data.
public ResultWithExceptionOctokit(T data)
Parameters
dataTThe successful result data.
Properties
Data
Gets or sets the successful result data.
public T? Data { get; set; }
Property Value
- T
ExceptionText
Gets or sets the exception text if the operation failed.
public string? ExceptionText { get; set; }