Exemplo n.º 1
0
        public override void Refresh()
        {
            try
            {
                this.MSBuildLauncher = this.CovenantClient.ApiLaunchersMsbuildGet();

                this.AdditionalOptions.FirstOrDefault(AO => AO.Name == "Set").Parameters
                .FirstOrDefault(P => P.Name == "Option").Values
                .FirstOrDefault(V => V.Value == "ListenerName")
                .NextValueSuggestions = this.CovenantClient.ApiListenersGet()
                                        .Where(L => L.Status == ListenerStatus.Active)
                                        .Select(L => L.Name)
                                        .ToList();

                var filevalues = new MenuCommandParameterValuesFromFilePath(Common.EliteDataFolder);
                this.AdditionalOptions.FirstOrDefault(AO => AO.Name == "Write").Parameters
                .FirstOrDefault().Values = filevalues;

                this.SetupMenuAutoComplete();
            }
            catch (HttpOperationException e)
            {
                EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content);
            }
        }
Exemplo n.º 2
0
        public override void Refresh()
        {
            try
            {
                this.Listener    = this.CovenantClient.ApiListenersByIdGet(this.Listener.Id ?? default);
                this.HostedFiles = this.CovenantClient.ApiListenersByIdHostedfilesGet(this.Listener.Id ?? default).ToList();

                this.AdditionalOptions.FirstOrDefault(AO => AO.Name == "Remove").Parameters
                .FirstOrDefault(P => P.Name == "HostPath").Values =
                    this.HostedFiles
                    .Select(HF => new MenuCommandParameterValue {
                    Value = HF.Path
                })
                    .ToList();

                var filevalues = new MenuCommandParameterValuesFromFilePath(Common.EliteDataFolder);
                this.AdditionalOptions.FirstOrDefault(AO => AO.Name == "Host").Parameters
                .FirstOrDefault(P => P.Name == "LocalFilePath").Values = filevalues;

                this.SetupMenuAutoComplete();
            }
            catch (HttpOperationException e)
            {
                EliteConsole.PrintFormattedWarningLine("CovenantException: " + e.Response.Content);
            }
        }