Table of Contents

Class Result

Namespace
Huddly.Sdk.Models
Assembly
Huddly.Sdk.dll
public sealed class Result
Inheritance
Result
Inherited Members

Constructors

Result(StatusCode, Exception?)

public Result(StatusCode statusCode, Exception? error = null)

Parameters

statusCode StatusCode
error Exception

Properties

Error

public Exception? Error { get; init; }

Property Value

Exception

IsSuccess

public bool IsSuccess { get; }

Property Value

bool

Message

public string Message { get; }

Property Value

string

StatusCode

public StatusCode StatusCode { get; init; }

Property Value

StatusCode

Methods

InternalError(Exception)

public static Result InternalError(Exception ex)

Parameters

ex Exception

Returns

Result

InternalError(string)

public static Result InternalError(string errorMessage)

Parameters

errorMessage string

Returns

Result

LogIfError(ILogger, string?, params object?[])

public void LogIfError(ILogger logger, string? message, params object?[] args)

Parameters

logger ILogger
message string
args object[]

NotSupported(Exception)

public static Result NotSupported(Exception ex)

Parameters

ex Exception

Returns

Result

NotSupported(string)

public static Result NotSupported(string errorMessage)

Parameters

errorMessage string

Returns

Result

PermissionDenied(Exception)

public static Result PermissionDenied(Exception ex)

Parameters

ex Exception

Returns

Result

Success()

public static Result Success()

Returns

Result

Success<T>(T)

public static Result<T> Success<T>(T value)

Parameters

value T

Returns

Result<T>

Type Parameters

T

ThrowIfError()

public void ThrowIfError()

Timeout(Exception)

public static Result Timeout(Exception ex)

Parameters

ex Exception

Returns

Result

Timeout(string)

public static Result Timeout(string errorMessage)

Parameters

errorMessage string

Returns

Result

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Unavailable(Exception)

public static Result Unavailable(Exception ex)

Parameters

ex Exception

Returns

Result

Unavailable(string)

public static Result Unavailable(string errorMessage)

Parameters

errorMessage string

Returns

Result