Example #1
0
        public Task Run()
        {
            var nativeApiInfo = _nativeApiInfoProvider.Get(MahuaPlatform.Mpq);
            var apiHandler    = _apiHandlerGenerator.Generate(new ApiHandlerGeneratorInput
            {
                Namespace           = "Newbe.Mahua.QQLight",
                NativeApiInfo       = nativeApiInfo,
                ApiOutBaseName      = "QQLightApiOutput",
                ApiHandlerClassName = "QQLightMahuaApiHandler",
            });

            File.WriteAllText("../Newbe.Mahua.QQLight/QQLightMahuaApiHandler.cs",
                              CodeFormatter.FormatCode(apiHandler),
                              Encoding.UTF8);
            return(Task.CompletedTask);
        }
Example #2
0
        public Task Run()
        {
            var nativeApiInfo = _nativeApiInfoProvider.Get(MahuaPlatform.Cqp);
            var apiHandler    = _apiHandlerGenerator.Generate(new ApiHandlerGeneratorInput
            {
                Namespace                      = "Newbe.Mahua.CQP",
                NativeApiInfo                  = nativeApiInfo,
                ApiOutBaseName                 = "CqpApiOutput",
                ApiHandlerClassName            = "CqpMahuaApiHandler",
                AuthCodeContainerInterfaceName = "ICqpAuthCodeContainer",
            });

            File.WriteAllText("../Newbe.Mahua.CQP/CqpMahuaApiHandler.cs",
                              CodeFormatter.FormatCode(apiHandler),
                              Encoding.UTF8);
            return(Task.CompletedTask);
        }
Example #3
0
        public Task Run()
        {
            var nativeApiInfo = _nativeApiInfoProvider.Get(MahuaPlatform.Mpq);
            var apiHandler    = _apiHandlerGenerator.Generate(new ApiHandlerGeneratorInput
            {
                Namespace           = "Newbe.Mahua.Mpq",
                NativeApiInfo       = nativeApiInfo,
                ApiOutBaseName      = "MpqApiOutput",
                ApiHandlerClassName = "MpqMahuaApiHandler",
            });

            var filename = Path.Combine(_sourceFileProvider.GetBasePath(),
                                        "Newbe.Mahua.MPQ/MpqMahuaApiHandler.cs");

            File.WriteAllText(filename,
                              CodeFormatter.FormatCode(apiHandler),
                              Encoding.UTF8);
            return(Task.CompletedTask);
        }