Пример #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)));
 }
Пример #2
0
 private Record(ReadableText name, Int1To20 amount)
 {
     ProductName = name;
     Amount      = amount;
 }