Пример #1
0
        public Task Run()
        {
            var nativeApiInfo = _nativeApiInfoProvider.Get(MahuaPlatform.CleverQQ);
            var nativeApiIn   = _httpApiInputModelsGenerator.Generate(new HttpApiInputModelsGeneratorInput
            {
                NativeApiInfo = nativeApiInfo,
                MahuaPlatform = MahuaPlatform.CleverQQ
            });
            var code = CodeFormatter.FormatCode(nativeApiIn);

            File.WriteAllText("../Newbe.Mahua.InputReceivers.HttpApi/Services/Controllers/CleverQQController.cs",
                              code,
                              Encoding.UTF8);
            return(Task.CompletedTask);
        }
Пример #2
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);
        }
Пример #3
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);
        }
Пример #4
0
        public Task Run()
        {
            var nativeApiInfo = _nativeApiInfoProvider.Get(MahuaPlatform.Mpq);
            var nativeApiIn   = _httpApiInputModelsGenerator.Generate(new HttpApiInputModelsGeneratorInput
            {
                NativeApiInfo = nativeApiInfo,
                MahuaPlatform = MahuaPlatform.Mpq
            });
            var code     = CodeFormatter.FormatCode(nativeApiIn);
            var filename = Path.Combine(_sourceFileProvider.GetBasePath(),
                                        "Newbe.Mahua.InputReceivers.HttpApi/Services/Controllers/MpqController.cs");

            File.WriteAllText(filename,
                              code,
                              Encoding.UTF8);

            return(Task.CompletedTask);
        }
Пример #5
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);
        }