Ejemplo n.º 1
0
 public void UsageTest2()
 {
     ValidationResultOr <Buch> buch = new Buch(seiten: 5);
     var result  = buch.Try(x => x.UmblaetternValidationResult());
     var result2 = result.Try(x => x.UmblaetternNormal());
     var result3 = result2.Try(x => x.UmblaetternValidationMessage());
 }
Ejemplo n.º 2
0
        public void UsageTest()
        {
            ValidationResultOr <Buch> buch = new Buch(seiten: 5);

            ValidationResultOr <Buch> result  = buch.Try(x => x.UmblaetternValidationResult());
            ValidationResultOr <Buch> result2 = buch.Try(x => x.UmblaetternNormal());

            buch.Try(x => x.UmblaetternNormal())
            .Try(x => x.UmblaetternNormal())
            .Try(x => x.UmblaetternValidationResult())
            .Try(x => x.UmblaetternNormal())
            .Try(x => x.UmblaetternNormal())
            .Try(x => x.UmblaetternNormal())
            .Try(x => x.UmblaetternNormal())
            .Try(x => Assert.Fail());
        }