Ejemplo n.º 1
0
 public static CodeBlockBuilder ArgumentException(
     this CodeBlockBuilder builder,
     string argumentName,
     string condition)
 {
     return(builder.AddIf(x =>
                          x.SetCondition(condition)
                          .AddCode($"throw new {TypeNames.ArgumentException}(nameof({argumentName}));")));
 }