Beispiel #1
0
        public async Task <ParseResult> ParseAsync(ITurnContext context, int startIndex, SearchResult searchResult, PreconditionResult preconditionResult = null, IServiceProvider services = null)
        {
            services = services ?? EmptyServiceProvider.Instance;

            if (!searchResult.IsSuccess)
            {
                return(ParseResult.FromError(searchResult));
            }
            if (preconditionResult != null && !preconditionResult.IsSuccess)
            {
                return(ParseResult.FromError(preconditionResult));
            }

            string input = searchResult.Text.Substring(startIndex);

            return(await CommandParser.ParseArgsAsync(this, context, _commandService._ignoreExtraArgs, services, input, 0, _commandService._quotationMarkAliasMap).ConfigureAwait(false));
        }
Beispiel #2
0
 public Task <ParseResult> ParseAsync(ITurnContext context, SearchResult searchResult, PreconditionResult preconditionResult = null, IServiceProvider services = null)
 => Command.ParseAsync(context, Alias.Length, searchResult, preconditionResult, services);