Exemple #1
0
 /// <summary>
 /// Asynchronously parses an action string.
 /// </summary>
 /// <param name="input">The action string.</param>
 /// <param name="throwOnError">Optional. Whether or not the parser should throw an exception if an operation
 /// failed. Defaults to <see langword="false"/>.</param>
 /// <returns>Returns an instance of <see cref="Action"/>.</returns>
 public static async Task <Action> ParseAsync(string input, bool throwOnError = false)
 {
     return(await ActionParser.ParseAsync(input, throwOnError)
            .ConfigureAwait(false));
 }
Exemple #2
0
 /// <summary>
 /// Parses an action string.
 /// </summary>
 /// <param name="input">The action string.</param>
 /// <param name="throwOnError">Optional. Whether or not the parser should throw an exception if an operation
 /// failed. Defaults to <see langword="false"/>.</param>
 /// <returns>Returns an instance of <see cref="Action"/>.</returns>
 public static Action Parse(string input, bool throwOnError = false)
 {
     return(ActionParser.ParseAsync(input, throwOnError)
            .ConfigureAwait(false)
            .GetAwaiter().GetResult());
 }