MediaTagResult Struct

Represents the result of a media tag operation that does not return a value.

public readonly struct MediaTagResult

Remarks

The default value of this type is a failure carrying MediaTagError.UnsupportedFormat, so MediaTagResult.Error is never null when MediaTagResult.IsSuccess is false.

Properties

NameDescription
ErrorGets the error that occurred, or null if the operation succeeded.
ErrorMessageGets a human-readable error message, if the operation failed.
IsSuccessGets a value indicating whether the operation succeeded.

Gets the error that occurred, or null if the operation succeeded.

public MediaTagError? Error { get; }

Property value

MediaTagError?

ErrorMessage

MediaTagResult.cs

Gets a human-readable error message, if the operation failed.

public string? ErrorMessage { get; }

Property value

string?

Gets a value indicating whether the operation succeeded.

public bool IsSuccess { get; }

Property value

bool

Methods

NameDescription
Failure(MediaTagError, string?)Creates a failure result with the specified error.
Success()Creates a successful result.

Failure(MediaTagError, string?)

MediaTagResult.cs

Creates a failure result with the specified error.

public static MediaTagResult Failure(MediaTagError error, string? message = null)

Parameters

error MediaTagError
message string?

Returns

MediaTagResult

Creates a successful result.

public static MediaTagResult Success()