Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                WriteLine("Hello World!");
                return;
            }

            switch (args[0])
            {
            case "types":
                System.IO.File.WriteAllText("../docs/types.md", Types.Print());
                break;

            case "repl":
                ExecuteCSharpRepl();
                break;

            case "roslyn":
                ExecuteCSharp();
                break;

            case "cultures":
                System.IO.File.WriteAllText("../docs/cultures.md", Cultures.Print());
                break;

            case "date-format":
                System.IO.File.WriteAllText("../docs/date-format.md", DateFormat.Print());
                break;

            case "inr":
                WriteLine(Cultures.FormatToIndianCurrency(29531.96M));
                WriteLine(Cultures.FormatToIndianCurrency(446517.7099M));
                break;

            case "xml-writer":
                FileSystem.CreateCSProjXmlFile();
                break;

            case "stream-writer":
                FileSystem.WriteUsingStreamWriter();
                break;

            case "file-stream":
                FileSystem.WriteUsingFileStream();
                break;

            case "stream-reader":
                WriteLine(FileSystem.ReadUsingStreamReader("Program.cs"));
                break;

            case "file-store-demo":
                FileStoreDemo();
                break;

            default:
                WriteLine("Bye");
                break;
            }
        }