Пример #1
0
 private Option <Bar> MrTibbs(Foo foo)
 {
     return(foo.IsSidney ? Option.Some(new Bar {
         Title = "Mr", Name = "Tibbs"
     }) : Option.None());
 }
Пример #2
0
 private Option <Bar> KnightedFoosToBar(Foo foo)
 {
     return(foo.IsOrderOfBritishEmpire ? Option.Some(new Bar {
         Title = "Sir", Name = "BigHead"
     }) : Option.None());
 }