Table of Contents

Struct TypeReaderResult

Namespace
Discord.Commands
Assembly
Discord.Net.Commands.dll
public struct TypeReaderResult : IResult
Implements
Inherited Members

Properties

BestMatch

public object BestMatch { get; }

Property Value

object

Exceptions

InvalidOperationException

TypeReaderResult was not successful.

Error

Describes the error type that may have occurred during the operation.

public readonly CommandError? Error { get; }

Property Value

CommandError?

A CommandError indicating the type of error that may have occurred during the operation; null if the operation was successful.

ErrorReason

Describes the reason for the error.

public readonly string ErrorReason { get; }

Property Value

string

A string containing the error reason.

IsSuccess

Indicates whether the operation was successful or not.

public bool IsSuccess { get; }

Property Value

bool

true if the result is positive; otherwise false.

Values

public readonly IReadOnlyCollection<TypeReaderValue> Values { get; }

Property Value

IReadOnlyCollection<TypeReaderValue>

Methods

FromError(CommandError, string)

public static TypeReaderResult FromError(CommandError error, string reason)

Parameters

error CommandError
reason string

Returns

TypeReaderResult

FromError(IResult)

public static TypeReaderResult FromError(IResult result)

Parameters

result IResult

Returns

TypeReaderResult

FromError(Exception)

public static TypeReaderResult FromError(Exception ex)

Parameters

ex Exception

Returns

TypeReaderResult

FromSuccess(TypeReaderValue)

public static TypeReaderResult FromSuccess(TypeReaderValue value)

Parameters

value TypeReaderValue

Returns

TypeReaderResult

FromSuccess(IReadOnlyCollection<TypeReaderValue>)

public static TypeReaderResult FromSuccess(IReadOnlyCollection<TypeReaderValue> values)

Parameters

values IReadOnlyCollection<TypeReaderValue>

Returns

TypeReaderResult

FromSuccess(object)

public static TypeReaderResult FromSuccess(object value)

Parameters

value object

Returns

TypeReaderResult

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.