RoboZhando/CommandNext/CommandQuery.cs
/// <summary>
/// Converts a argument to the specific type.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="key"></param>
/// <returns></returns>
Converts a argument to the specific type.
Converts a argument to the specific type .
public async Task<T> ConvertArgumentAsync<T>(string key)
        {
            if (TryGetString(key, out var str))
                return (T) (await CommandsNext.ConvertArgument<T>(str, Context));
            throw new KeyNotFoundException($"There is no value for the specified argument {key}");
        }
public async Task < T > ConvertArgumentAsync < T > ( string key ) { if ( TryGetString ( key , out var str ) ) return ( T ) ( await CommandsNext . ConvertArgument < T > ( str , Context ) ) ; throw new KeyNotFoundException ( $" There is no value for the specified argument  { key } " ) ; }
Converts a argument to the specific type.
Converts a argument to the specific type .
None
key
string
None
typeparam
None