예제 #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;
 }