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