private static async Task <object> ReadSingle(TypeReader reader, ICommandContext context, string arg, IServiceProvider services)
        {
            TypeReaderResult readResult = await reader.ReadAsync(context, arg, services).ConfigureAwait(false);

            return((readResult.IsSuccess)
                ? readResult.BestMatch
                : null);
        }
예제 #2
0
 public async Task <TypeReaderResult> ParseAsync(ICommandContext context, string input, IServiceProvider services = null)
 {
     services = services ?? EmptyServiceProvider.Instance;
     return(await _reader.ReadAsync(context, input, services).ConfigureAwait(false));
 }