Add Async suffix to command-related Tasks (#804)
commit b7fb44a94fb1e75f696f281d6b201eba3f48e864 Author: Hsu Still <341464@gmail.com> Date: Sat Sep 2 14:34:18 2017 +0800 Fix more async naming violation commit e6912e2d020c69325826dbfa62c07cd1ef2cc45f Author: Hsu Still <341464@gmail.com> Date: Sat Sep 2 14:23:04 2017 +0800 Fix incorrect null xmldocs string commit da8d23222d207853375c3512232d1d7fd3629cad Author: Hsu Still <341464@gmail.com> Date: Sat Sep 2 14:17:12 2017 +0800 Fix CheckPreconditionsAsync commit 992407407a42fec9087c9ed18e0bf5de30dff82c Author: Hsu Still <341464@gmail.com> Date: Sat Sep 2 14:07:12 2017 +0800 Add Async suffix to abstract Task methods
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Discord.Commands
|
||||
QuotedParameter
|
||||
}
|
||||
|
||||
public static async Task<ParseResult> ParseArgs(CommandInfo command, ICommandContext context, IServiceProvider services, string input, int startPos)
|
||||
public static async Task<ParseResult> ParseArgsAsync(CommandInfo command, ICommandContext context, IServiceProvider services, string input, int startPos)
|
||||
{
|
||||
ParameterInfo curParam = null;
|
||||
StringBuilder argBuilder = new StringBuilder(input.Length);
|
||||
@@ -111,7 +111,7 @@ namespace Discord.Commands
|
||||
if (curParam == null)
|
||||
return ParseResult.FromError(CommandError.BadArgCount, "The input text has too many parameters.");
|
||||
|
||||
var typeReaderResult = await curParam.Parse(context, argString, services).ConfigureAwait(false);
|
||||
var typeReaderResult = await curParam.ParseAsync(context, argString, services).ConfigureAwait(false);
|
||||
if (!typeReaderResult.IsSuccess && typeReaderResult.Error != CommandError.MultipleMatches)
|
||||
return ParseResult.FromError(typeReaderResult);
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Discord.Commands
|
||||
|
||||
if (curParam != null && curParam.IsRemainder)
|
||||
{
|
||||
var typeReaderResult = await curParam.Parse(context, argBuilder.ToString(), services).ConfigureAwait(false);
|
||||
var typeReaderResult = await curParam.ParseAsync(context, argBuilder.ToString(), services).ConfigureAwait(false);
|
||||
if (!typeReaderResult.IsSuccess)
|
||||
return ParseResult.FromError(typeReaderResult);
|
||||
argList.Add(typeReaderResult);
|
||||
|
||||
Reference in New Issue
Block a user