Exemple #1
0
        public MSBuildLauncherMenuItem(CovenantAPI CovenantClient, EventPrinter EventPrinter) : base(CovenantClient, EventPrinter)
        {
            this.msbuildLauncher = CovenantClient.ApiLaunchersMsbuildGet();
            this.MenuTitle       = msbuildLauncher.Name;
            this.MenuDescription = msbuildLauncher.Description;

            this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherShow(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherGenerate(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherCode());
            this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherHost(CovenantClient));
            this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherWriteFile());
            var setCommand = new MenuCommandMSBuildLauncherSet(CovenantClient);

            this.AdditionalOptions.Add(setCommand);
            this.AdditionalOptions.Add(new MenuCommandGenericUnset(setCommand.Parameters.FirstOrDefault(P => P.Name == "Option").Values));

            this.Refresh();
        }
Exemple #2
0
        public MSBuildLauncherMenuItem(CovenantAPI CovenantClient) : base(CovenantClient)
        {
            try
            {
                this.MSBuildLauncher = CovenantClient.ApiLaunchersMsbuildGet();
                this.MenuTitle       = MSBuildLauncher.Name;
                this.MenuDescription = MSBuildLauncher.Description;

                this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherShow(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherGenerate(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherCode(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherHost(CovenantClient));
                this.AdditionalOptions.Add(new MenuCommandMSBuildLauncherWriteFile(CovenantClient));
                var setCommand = new MenuCommandMSBuildLauncherSet(CovenantClient);
                this.AdditionalOptions.Add(setCommand);
                this.AdditionalOptions.Add(new MenuCommandGenericUnset(setCommand.Parameters.FirstOrDefault(P => P.Name == "Option").Values));
            }
            catch (HttpOperationException e)
            {
                EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content);
            }
        }