コード例 #1
0
ファイル: Examples.cs プロジェクト: stijnmoreels/FPrimitive
 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
ファイル: Examples.cs プロジェクト: stijnmoreels/FPrimitive
 private Record(ReadableText name, Int1To20 amount)
 {
     ProductName = name;
     Amount      = amount;
 }