Пример #1
0
        static int Main(string[] args)
        {
            if (!ParametersParser.Start(args))
            {
                return(-1);
            }
            try
            {
                ParametersParser.LoadParameters();

                Console.WriteLine("Generating Event Bus Command from...");
                Console.WriteLine("Assembly: " + Context.AssemblyFile);
                Console.WriteLine("Command: " + Context.CommandName);
                Console.WriteLine("Temp folder: " + Context.TempPath);

                Context.LoadAssembly();
                Context.PrepareOutputDirectory();

                new List <ProjectCreator> {
                    new EventBusCommandProjectCreator()
                };

                var eventBusCommandProjectCreator = new EventBusCommandProjectCreator();
                eventBusCommandProjectCreator.Build();
                new NugetCreator(eventBusCommandProjectCreator).Create();

                Console.WriteLine("Add done");
                return(0);
            }
            catch (Exception ex)
            {
                Helper.ShowError(ex);
                return(-1);
            }
        }
Пример #2
0
        static int Main(string[] args)
        {
            if (!ParametersParser.Start(args))
            {
                return(-1);
            }
            try
            {
                ParametersParser.LoadParameters();

                Console.WriteLine("Command: " + Context.Command + " nugets ");
                Console.WriteLine("File: file: " + Context.FileName);
                Console.WriteLine();

                if (Context.Command == Command.Extract)
                {
                    Extract.Start();
                }
                else
                {
                    Restore.Start();
                }

                Console.WriteLine("Cashe Nuget was done");

                return(0);
            }
            catch (Exception ex)
            {
                Helper.ShowError(ex);
                return(-1);
            }
        }
Пример #3
0
        static int Main(string[] args)
        {
            if (!Initialize(args))
            {
                return(-1);
            }

            try
            {
                ParametersParser.LoadParameters();

                Console.WriteLine("Generating Client SDK proxy from...");
                Console.WriteLine("Publisher service: " + Context.PublisherService);
                Console.WriteLine("Api assembly: " + Context.AssemblyFile);
                Console.WriteLine("Api controller: " + Context.ControllerName);
                Console.WriteLine("Temp folder: " + Context.TempPath);
                Context.LoadAssembly();
                Context.PrepareOutputDirectory();
                DtoTypes.FindAll();
                DtoDataProviderClassGenerator.ValidateRemoteDataProviderAttributes();

                new List <ProjectCreator> {
                    new ProxyProjectCreator()
                };

                var proxyCreator = new ProxyProjectCreator();
                proxyCreator.Build();
                new NugetCreator(proxyCreator).Create();

                if (DtoTypes.All.Any())
                {
                    var projectCreators = new[] { new MSharpProjectCreator(), new MSharp46ProjectCreator() };
                    projectCreators.AsParallel().Do(x => x.Build());
                    new NugetCreator(projectCreators).Create();
                }

                Console.WriteLine("Add done");
                return(0);
            }
            catch (Exception ex)
            {
                ShowError(ex);
                return(-1);
            }
        }
Пример #4
0
        static int Main(string[] args)
        {
            if (!ParametersParser.Start(args))
            {
                return(-1);
            }
            try
            {
                ParametersParser.LoadParameters();

                Console.WriteLine("Generating Data Endpoint from...");
                Console.WriteLine("Assembly: " + Context.AssemblyFile);
                Console.WriteLine("Endpoint: " + Context.EndpointName);
                Console.WriteLine("Temp folder: " + Context.TempPath);

                Context.LoadAssembly();
                Context.FindExposedTypes();
                Context.PrepareOutputDirectory();

                new List <ProjectCreator> {
                    new EndpointProjectCreator()
                };

                var endPointCreator = new EndpointProjectCreator();
                endPointCreator.Build();
                new NugetCreator(endPointCreator).Create();

                if (Context.ExposedTypes.Any())
                {
                    var projectCreators = new[] { new MSharpProjectCreator(), new MSharp46ProjectCreator() };
                    projectCreators.AsParallel().Do(x => x.Build());
                    new NugetCreator(projectCreators).Create();
                }

                Console.WriteLine("Add done");
                return(0);
            }
            catch (Exception ex)
            {
                Helper.ShowError(ex);
                return(-1);
            }
        }