Example #1
0
 private static Either <Error, Role> ReadRole()
 {
     Console.WriteLine("Role:");
     return(Parsers.ParseEnum <Role>(Console.ReadLine())
            .ToEither <Error>(new InvalidRole()));
 }
Example #2
0
 private static Either <Error, UserAction> ReadAction()
 {
     return(Parsers.ParseEnum <UserAction>(Console.ReadLine())
            .ToEither <Error>(new InvalidAction()));
 }
Example #3
0
 private static Either <Error, int> ReadEmployeeId()
 {
     Console.WriteLine("Employee Id:");
     return(Parsers.ParseInt(Console.ReadLine())
            .ToEither <Error>(new InvalidEmployeeId()));
 }