Пример #1
0
 // output_stream_t::initialize(...
 public static TextWriter OutputStreamInitialize(string outputFile, string pagerPath)
 {
     if (IsStdErr(outputFile))
     {
         return(VirtualConsole.Error);
     }
     else if (!String.IsNullOrWhiteSpace(outputFile) && outputFile != "-")
     {
         return(FileSystemProvider.CreateText(outputFile));
     }
     else if (!String.IsNullOrWhiteSpace(pagerPath))
     {
         return(VirtualPager.GetPager(pagerPath));
     }
     else
     {
         return(VirtualConsole.Output);
     }
 }