コード例 #1
0
        public static void Main(string[] args)
        {
            var metadataSrv = Generator.Generate();

            var pathToGenerated = ProgramUtils.GetPathToGenerated();

            metadataSrv.WritePrettyJson(pathToGenerated, "metadata_srv.json");

            Console.WriteLine();
            Console.WriteLine("Done! Press any key to continue ...");
            Console.ReadLine();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            var pathToAppData = ProgramUtils.GetPathToAppData();
            var metadataCli   = pathToAppData.GetJsonFromAppDataAs <MetadataCli.Metadata>("metadata_cli.json");

            // generate code
            var generatedCode = Generator.Generate(metadataCli);

            // save generated code on file to disk
            var pathToGenerated = ProgramUtils.GetPathToGenerated();

            generatedCode.WriteToFile(pathToGenerated, "dataProvider.ts");

            Console.WriteLine();
            Console.WriteLine("Done! Press a key to exit...");
            Console.ReadLine();
        }
コード例 #3
0
        public static void Main(string[] args)
        {
            var pathToAppData = ProgramUtils.GetPathToAppData();

            var metadataSrv           = pathToAppData.GetJsonFromAppDataAs <MetadataCli.Metadata>("metadata_srv.json");
            var metadataCliOperations = pathToAppData.GetJsonFromAppDataAs <MetadataCli.Metadata>("metadata_cli_operations.json");

            var metadataCliFull = Generator.GenerateMetadataCliFull(metadataSrv, metadataCliOperations);
            var metadataCli     = Generator.GenerateMetadataCli(metadataCliFull);

            var pathToGenerated = ProgramUtils.GetPathToGenerated();

            metadataCliFull.WritePrettyJson(pathToGenerated, "metadata_cli_full.json");
            metadataCli.WritePrettyJson(pathToGenerated, "metadata_cli.json");

            Console.WriteLine();
            Console.WriteLine("Done! Press any key to continue ...");
            Console.ReadLine();
        }