Table of Contents

Class MessageTypeReader<T>

Namespace
Fluxer.Net.Commands
Assembly
Fluxer.Net.dll

A TypeReader for parsing objects implementing IMessage.

public class MessageTypeReader<T> : TypeReader where T : class, IMessage

Type Parameters

T

The type to be checked; must implement IMessage.

Inheritance
object
MessageTypeReader<T>

Methods

ReadAsync(ICommandContext, string, IServiceProvider)

Attempts to parse the input into the desired type.

public override Task<TypeReaderResult> ReadAsync(ICommandContext context, string input, IServiceProvider services)

Parameters

context ICommandContext

The context of the command.

input string

The raw input of the command.

services IServiceProvider

The service collection used for dependency injection.

Returns

Task<TypeReaderResult>

A task that represents the asynchronous parsing operation. The task result contains the parsing result.