Struct SearchResult
public struct SearchResult : IResult
- Implements
- Inherited Members
Properties
Commands
public readonly IReadOnlyList<CommandMatch> Commands { get; }
Property Value
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
Text
public readonly string Text { get; }
Property Value
Methods
FromError(CommandError, string)
public static SearchResult FromError(CommandError error, string reason)
Parameters
error
CommandErrorreason
string
Returns
FromError(IResult)
public static SearchResult FromError(IResult result)
Parameters
result
IResult
Returns
FromError(Exception)
public static SearchResult FromError(Exception ex)
Parameters
ex
Exception
Returns
FromSuccess(string, IReadOnlyList<CommandMatch>)
public static SearchResult FromSuccess(string text, IReadOnlyList<CommandMatch> commands)
Parameters
text
stringcommands
IReadOnlyList<CommandMatch>
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.