示例#1
0
        public static string TestIOop()
        {
            string fileName = "hello.txt";

            return(IOFactoryFP
                   .IOop <string, Exception, string>(File.ReadAllText, fileName)
                   .Match(e => "Error", str => "OK"));
        }
示例#2
0
 public static string TestSafely()
 {
     return(IOFactoryFP
            .Safely <string, Exception, string>(
                File.ReadAllText,
                e => e,
                "hello.txt"
                )
            .Match(e => "Error", str => "OK"));
 }