Skip to main content

Struct SearchResult

Assembly: Revolt.Net.Commands.dll​
View Source​
Declaration
public struct SearchResult : IResult

Properties​

Text​

View Source​
Declaration
public readonly string Text { get; }

Commands​

View Source​
Declaration
public readonly IReadOnlyList<CommandMatch> Commands { get; }

Error​

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

View Source​
Declaration
public readonly CommandError? Error { get; }

ErrorReason​

Describes the reason for the error.

View Source​
Declaration
public readonly string ErrorReason { get; }

IsSuccess​

Indicates whether the operation was successful or not.

View Source​
Declaration
public readonly bool IsSuccess { get; }

Methods​

FromSuccess(String, IReadOnlyList<CommandMatch>)​

View Source​
Declaration
public static SearchResult FromSuccess(string text, IReadOnlyList<CommandMatch> commands)
Returns​

Revolt.Commands.Results.SearchResult

Parameters​
TypeName
System.Stringtext
IReadOnlyList<Revolt.Commands.CommandMatch>commands

FromError(CommandError, String)​

View Source​
Declaration
public static SearchResult FromError(CommandError error, string reason)
Returns​

Revolt.Commands.Results.SearchResult

Parameters​
TypeName
Revolt.Commands.CommandErrorerror
System.Stringreason

FromError(Exception)​

View Source​
Declaration
public static SearchResult FromError(Exception ex)
Returns​

Revolt.Commands.Results.SearchResult

Parameters​
TypeName
Exceptionex

FromError(IResult)​

View Source​
Declaration
public static SearchResult FromError(IResult result)
Returns​

Revolt.Commands.Results.SearchResult

Parameters​
TypeName
Revolt.Commands.Results.IResultresult

ToString()​

View Source​
Declaration
public override string ToString()
Returns​

System.String

Implements​