示例#1
0
 /// <summary>
 /// Runs the previously specified targets and then calls <see cref="Environment.Exit(int)"/>.
 /// Any code which follows a call to this method will not be executed.
 /// </summary>
 /// <param name="args">The command line arguments.</param>
 /// <param name="messageOnly">
 /// A predicate that is called when an exception is thrown.
 /// Return <c>true</c> to display only the exception message instead instead of the full exception details.
 /// </param>
 /// <returns>A <see cref="Task"/> that represents the asynchronous running of the targets.</returns>
 public static Task RunTargetsAndExitAsync(IEnumerable <string> args, Func <Exception, bool> messageOnly) =>
 targets.RunAndExitAsync(args, messageOnly);
示例#2
0
 /// <summary>
 /// Runs the previously specified targets and then calls <see cref="Environment.Exit(int)"/>.
 /// Any code which follows a call to this method will not be executed.
 /// </summary>
 /// <param name="args">The command line arguments.</param>
 /// <param name="messageOnly">
 /// A predicate that is called when an exception is thrown.
 /// Return <c>true</c> to display only the exception message instead instead of the full exception details.
 /// </param>
 /// <param name="logPrefix">
 /// The prefix to use for log messages.
 /// If not specified or <c>null</c>, the name of the entry assembly will be used, as returned by <see cref="System.Reflection.Assembly.GetEntryAssembly"/>.
 /// If the entry assembly is <c>null</c>, the default prefix of "Bullseye" is used.
 /// </param>
 /// <returns>A <see cref="Task"/> that represents the asynchronous running of the targets.</returns>
 public static Task RunTargetsAndExitAsync(IEnumerable <string> args, Func <Exception, bool> messageOnly = null, string logPrefix = null) =>
 targets.RunAndExitAsync(args, messageOnly, logPrefix);