Ejemplo n.º 1
0
 public static ValidationResult <Record> Create(string productName, int amount)
 {
     return(ReadableText.Create(productName)
            .Zip(Int1To20.Create(amount),
                 (txt, integer) => new Record(txt, integer)));
 }
Ejemplo n.º 2
0
 private Record(ReadableText name, Int1To20 amount)
 {
     ProductName = name;
     Amount      = amount;
 }