in src/build/Extensions/BuildContextExtensions.cs [9:20]
public static void SetCommand(this BuildContext ctx, IElastiBuildCommand cmd) =>
ctx.Items.Add(nameof(IElastiBuildCommand), cmd);
public static IElastiBuildCommand GetCommand(this BuildContext ctx)
{
if (ctx.Items.TryGetValue(nameof(IElastiBuildCommand), out var obj) && obj is IElastiBuildCommand cmd)
return cmd;
throw new Exception(
$"Unable to get {nameof(IElastiBuildCommand)} instance from " +
$"{nameof(BuildContext)}.{nameof(BuildContext.Items)}");
}