MediaTagResult<T> Struct
Represents the result of a media tag operation that returns a value of type T.
public readonly struct MediaTagResult<T>Type parameters
T- The type of the result value.
Remarks
The default value of this type is a failure carrying MediaTagError.UnsupportedFormat, so MediaTagResult<T>.Error is never null when MediaTagResult<T>.IsSuccess is false.
Properties
| Name | Description |
|---|---|
| Error | Gets the error that occurred, or null if the operation succeeded. |
| ErrorMessage | Gets a human-readable error message, if the operation failed. |
| IsSuccess | Gets a value indicating whether the operation succeeded. |
| Value | Gets the result value. Throws if the operation failed. |
Error
MediaTagResult.csGets the error that occurred, or null if the operation succeeded.
public MediaTagError? Error { get; }Property value
ErrorMessage
MediaTagResult.csIsSuccess
MediaTagResult.csValue
MediaTagResult.csGets the result value. Throws if the operation failed.
public T Value { get; }Property value
T
Methods
| Name | Description |
|---|---|
| Failure(MediaTagError, string?) | Creates a failure result with the specified error. |
| Success(T) | Creates a successful result with the specified value. |
Failure(MediaTagError, string?)
MediaTagResult.csCreates a failure result with the specified error.
public static MediaTagResult<T> Failure(MediaTagError error, string? message = null)Success(T)
MediaTagResult.csCreates a successful result with the specified value.
public static MediaTagResult<T> Success(T value)