static FrameworkElement CreateTextBlock(CachedOutput cachedOutput, bool highlight) {
				var gen = UISyntaxHighlighter.Create(highlight);
				var conv = new OutputConverter(gen.TextOutput);
				foreach (var t in cachedOutput.data)
					conv.Write(t.Item1, t.Item2);
				return gen.CreateTextBlock(true);
			}
        public void ShouldConvertNumberToProperValue()
        {
            var input = new [] { 1 };

            var output = OutputConverter.Convert(input);

            Assert.AreEqual("a", output);
        }
        public void ShouldConvertAlleLettersToAppropriateValues()
        {
            var input = Helpers.GenerateAllNumberValuesForLetters();

            var output = OutputConverter.Convert(input);

            Assert.AreEqual(Helpers.GenerateAllLetters(), output);
        }
        public void ShouldConvertUpperCaseAToAppropriateValue()
        {
            var input = new[] { 27 };

            var output = OutputConverter.Convert(input);

            Assert.AreEqual("A", output);
        }
Beispiel #5
0
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <TenantResource>();

            var tenantNameList = TenantName?.ToList().ConvertAll(s => s.ToLower());

            if (tenantNameList == null)
            {
                baseResourceList.AddRange(_connection.Repository.Tenants.FindAll());
            }

            else
            {
                //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                if (tenantNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && tenantNameList.Count > 1))
                {
                    throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("TenantName");
                }
                //Only 1 wildcarded value (ie -MachineName WebServer*)
                else if (tenantNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && tenantNameList.Count == 1))
                {
                    var pattern = new WildcardPattern(tenantNameList.First());
                    baseResourceList.AddRange(_connection.Repository.Tenants.FindMany(t => pattern.IsMatch(t.Name.ToLower())));
                }
                //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                else if (!tenantNameList.Any(WildcardPattern.ContainsWildcardCharacters))
                {
                    baseResourceList.AddRange(_connection.Repository.Tenants.FindMany(t => tenantNameList.Contains(t.Name.ToLower())));
                }
            }

            if (ResourceOnly)
            {
                if (baseResourceList.Count == 1)
                {
                    WriteObject(baseResourceList.FirstOrDefault(), true);
                }
                else
                {
                    WriteObject(baseResourceList, true);
                }
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusTenant(baseResourceList);

                if (outputList.Count == 1)
                {
                    WriteObject(outputList.FirstOrDefault(), true);
                }
                else
                {
                    WriteObject(outputList, true);
                }
            }
        }
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <ProjectGroupResource>();

            switch (ParameterSetName)
            {
            case All:
                baseResourceList = _connection.Repository.ProjectGroups.FindAll();
                break;

            case ByName:
                var projectGroupNameList = ProjectGroupName?.ToList().ConvertAll(s => s.ToLower());
                //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                if (projectGroupNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && projectGroupNameList.Count > 1))
                {
                    throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("ProjectGroupName");
                }
                //Only 1 wildcarded value (ie -MachineName WebServer*)
                else if (projectGroupNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && projectGroupNameList.Count == 1))
                {
                    var pattern = new WildcardPattern(projectGroupNameList.First());
                    baseResourceList = _connection.Repository.ProjectGroups.FindMany(x => pattern.IsMatch(x.Name.ToLower()));
                }
                //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                else if (!projectGroupNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item)))
                {
                    baseResourceList = _connection.Repository.ProjectGroups.FindMany(x => projectGroupNameList.Contains(x.Name.ToLower()));
                }
                break;
            }

            if (ResourceOnly)
            {
                if (baseResourceList.Count == 1)
                {
                    WriteObject(baseResourceList.FirstOrDefault(), true);
                }
                else
                {
                    WriteObject(baseResourceList, true);
                }
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusProjectGroup(baseResourceList);

                if (outputList.Count == 1)
                {
                    WriteObject(outputList.FirstOrDefault(), true);
                }
                else
                {
                    WriteObject(outputList, true);
                }
            }
        }
Beispiel #7
0
        void CreateContent(ITextColorWriter output, CachedOutput cachedOutput, bool highlight)
        {
            var conv = new OutputConverter(output);

            foreach (var t in cachedOutput.data)
            {
                conv.Write(t.Item1, t.Item2);
            }
        }
Beispiel #8
0
        void Write(CachedOutput co)
        {
            var conv = new OutputConverter(output);

            foreach (var t in co.data)
            {
                conv.Write(t.Item1, t.Item2);
            }
        }
Beispiel #9
0
        protected override void ProcessRecord()
        {
            var rawDashboard = _connection.Repository.Dashboards.GetDashboard();

            var converter = new OutputConverter();

            var outputList = converter.GetOctopusDashboard(rawDashboard, ProjectName, EnvironmentName, DeploymentStatus);

            WriteObject(outputList, true);
        }
Beispiel #10
0
            static TextBlock CreateTextBlock(CachedOutput cachedOutput, bool highlight)
            {
                var gen  = UISyntaxHighlighter.Create(highlight);
                var conv = new OutputConverter(gen.TextOutput);

                foreach (var t in cachedOutput.data)
                {
                    conv.Write(t.Item1, t.Item2);
                }
                return(gen.CreateTextBlock(true));
            }
Beispiel #11
0
        private void initData()
        {
            neuralNetwork                      = null;
            neuralNetStatus.Content            = "Brak";
            LearningSettingsGroupBox.IsEnabled = false;
            ShowDataGroupBox.IsEnabled         = false;

            expectedOutputLabel.Content    = "";
            neuralNetOutputLabel.Content   = "";
            outputProbabilityLabel.Content = "";

            MyCustomMessage customMessage = new MyCustomMessage()
            {
                Owner   = this,
                Message = "Trwa ładowanie danych..."
            };

            customMessage.Show();

            Thread thread = new Thread(() => { dataHolder.Load(); });

            thread.Start();
            thread.Join();

            List <BitArray>            distinctOutputs   = dataHolder.GetDistinctOutputs();
            Dictionary <int, BitArray> translatedOutputs = dataHolder.GetTranslateOutputs(distinctOutputs);

            outputConverter = new OutputConverter();

            foreach (KeyValuePair <int, BitArray> entry in translatedOutputs)
            {
                outputConverter.AddItem(entry.Value, entry.Key);
            }

            imageViewer = new ImageViewer(ImageGrid, dataHolder.ImageHeight, dataHolder.ImageWidth);

            DataSettingsGroupBox.IsEnabled = true;
            dataStatus.Content             = "Rekordów: " + dataHolder.Items.Count;

            customMessage.Close();
            MessageBox.Show(this, "Wczytano " + dataHolder.Items.Count + " rekordów");
        }
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <DeploymentResource>();
            var projects         = new List <DashboardProjectResource>();
            var environments     = new List <DashboardEnvironmentResource>();
            var releases         = new List <ReleaseResource>();

            //Using the dashboard for this because it involves only 1 API call VS calling Projects/Environmnets.FindByName() plenty of times.
            var rawDashboard = _connection.Repository.Dashboards.GetDashboard();

            if (ProjectName == null)
            {
                projects.AddRange(rawDashboard.Projects);
            }
            else
            {
                foreach (var name in ProjectName)
                {
                    var project = rawDashboard.Projects.FirstOrDefault(p => p.Name == name);
                    if (project != null)
                    {
                        projects.Add(project);
                    }
                    else
                    {
                        //todo Handle this better
                        var message = string.Format("Project not found: {0}", name);
                        WriteObject(message);
                    };
                }
            }

            foreach (var dashboardProject in projects)
            {
                var project = _connection.Repository.Projects.Get(dashboardProject.Id);

                switch (ParameterSetName)
                {
                case ByVersion:
                    foreach (var version in ReleaseVersion)
                    {
                        try
                        {
                            releases.Add(_connection.Repository.Projects.GetReleaseByVersion(project, version));
                        }
                        catch (Exception e)
                        {
                            WriteError(new ErrorRecord(e, "ResourceNotFound", ErrorCategory.ObjectNotFound, e.Message));
                        }
                    }
                    break;

                case ByLatest:

                    var projectReleases = new List <ReleaseResource>();

                    if (LatestReleases > 30)
                    {
                        projectReleases = _connection.Repository.Projects.GetAllReleases(project).ToList();
                    }
                    else
                    {
                        projectReleases = _connection.Repository.Projects.GetReleases(project).Items.ToList();
                    }

                    if (projectReleases.Count > LatestReleases)
                    {
                        releases.AddRange(projectReleases.GetRange(0, LatestReleases));
                    }
                    else
                    {
                        releases.AddRange(projectReleases);
                    }

                    break;

                default:
                    releases.AddRange(_connection.Repository.Projects.GetAllReleases(project).ToList());
                    break;
                }
            }

            if (EnvironmentName == null)
            {
                environments = rawDashboard.Environments;
            }
            else
            {
                foreach (var name in EnvironmentName)
                {
                    var environment = rawDashboard.Environments.FirstOrDefault(e => e.Name == name);
                    if (environment != null)
                    {
                        environments.Add(environment);
                    }
                    else
                    {
                        //todo Handle this better
                        var message = $"Environment not found: {name}";
                        WriteObject(message);
                    }
                }
            }

            var envIds = new HashSet <string>(environments.Select(e => e.Id));

            foreach (var release in releases)
            {
                baseResourceList.AddRange(_connection.Repository.Releases.GetDeployments(release).Items.Where(d => (d.Created > After) && (d.Created < Before) && (envIds.Contains(d.EnvironmentId))).ToList());
            }

            ResourceOnly = false;

            if (ResourceOnly)
            {
                WriteObject(baseResourceList);
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusDeployment(baseResourceList, environments, projects, releases);

                WriteObject(outputList);
            }
        }
Beispiel #13
0
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <ChannelResource>();

            if (_projectNameList == null)
            {
                var allProjects = _connection.Repository.Projects.FindAll();

                if (_channelNameList == null)
                {
                    allProjects.ForEach(p => baseResourceList.AddRange(_connection.Repository.Projects.GetChannels(p).Items.ToList()));
                }
                else
                {
                    allProjects.ForEach(p => baseResourceList.AddRange(_connection.Repository.Projects.GetChannels(p).Items.Where(c => _channelNameList.Contains(c.Name.ToLower())).ToList()));
                }
            }
            else
            {
                var projects = new List <ProjectResource>();

                foreach (var name in _projectNameList)
                {
                    var project = _connection.Repository.Projects.FindByName(name);

                    if (project == null)
                    {
                        throw OctoposhExceptions.ResourceNotFound(name, "Project");
                    }

                    projects.Add(project);
                }

                foreach (var project in projects)
                {
                    if (_channelNameList == null)
                    {
                        baseResourceList.AddRange(_connection.Repository.Projects.GetChannels(project).Items.ToList());
                    }

                    else
                    {
                        //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                        if (_channelNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && _channelNameList.Count > 1))
                        {
                            throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("ChannelName");
                        }
                        //Only 1 wildcarded value (ie -MachineName WebServer*)
                        else if (_channelNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && _channelNameList.Count == 1))
                        {
                            var pattern = new WildcardPattern(_channelNameList.First());
                            baseResourceList.AddRange(_connection.Repository.Projects.GetChannels(project).Items.Where(t => pattern.IsMatch(t.Name.ToLower())).ToList());
                        }
                        //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                        else if (!_channelNameList.Any(WildcardPattern.ContainsWildcardCharacters))
                        {
                            baseResourceList.AddRange(_connection.Repository.Projects.GetChannels(project).Items.Where(t => _channelNameList.Contains(t.Name.ToLower())).ToList());
                        }
                    }
                }
            }

            if (ResourceOnly)
            {
                WriteObject(baseResourceList);
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusChannel(baseResourceList);

                WriteObject(outputList);
            }
        }
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <VariableSetResource>();
            var variableSetIDs   = new List <string>();

            var projectList            = new List <ProjectResource>();
            var libraryVariableSetList = new List <LibraryVariableSetResource>();

            var librarySetNameList = LibrarySetName?.ToList().ConvertAll(s => s.ToLower());

            var projectNameList = ProjectName?.ToList().ConvertAll(s => s.ToLower());

            //If no Project and Library set is declared, return all the things.
            if (projectNameList == null && librarySetNameList == null)
            {
                projectList.AddRange(_connection.Repository.Projects.FindAll());
                libraryVariableSetList.AddRange(_connection.Repository.LibraryVariableSets.FindAll());
            }

            //If at least 1 project or Library variable set is defined, then just return that list instead of everything.
            else
            {
                #region Getting projects
                //Getting variable set ids from projects

                if (projectNameList != null)
                {
                    //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                    if (projectNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && projectNameList.Count > 1))
                    {
                        throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("ProjectName");
                    }
                    //Only 1 wildcarded value (ie -MachineName WebServer*)
                    else if (projectNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && projectNameList.Count == 1))
                    {
                        var pattern = new WildcardPattern(projectNameList.First());
                        projectList.AddRange(_connection.Repository.Projects.FindMany(t => pattern.IsMatch(t.Name.ToLower())));
                    }
                    //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                    else if (!projectNameList.Any(WildcardPattern.ContainsWildcardCharacters))
                    {
                        projectList.AddRange(_connection.Repository.Projects.FindMany(t => projectNameList.Contains(t.Name.ToLower())));
                    }
                }
                #endregion

                #region Getting Library variable sets
                if (librarySetNameList != null)
                {
                    //Getting variable set ids from LibraryVariableSets

                    //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                    if (librarySetNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && librarySetNameList.Count > 1))
                    {
                        throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("LibrarySetName");
                    }
                    //Only 1 wildcarded value (ie -MachineName WebServer*)
                    else if (librarySetNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && librarySetNameList.Count == 1))
                    {
                        var pattern = new WildcardPattern(librarySetNameList.First());
                        libraryVariableSetList.AddRange(_connection.Repository.LibraryVariableSets.FindMany(t => pattern.IsMatch(t.Name.ToLower())));
                    }
                    //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                    else if (!librarySetNameList.Any(WildcardPattern.ContainsWildcardCharacters))
                    {
                        libraryVariableSetList.AddRange(_connection.Repository.LibraryVariableSets.FindMany(t => librarySetNameList.Contains(t.Name.ToLower())));
                    }
                }
                #endregion
            }

            variableSetIDs.AddRange(libraryVariableSetList.Select(v => v.VariableSetId));
            variableSetIDs.AddRange(projectList.Select(p => p.VariableSetId));

            //This works
            foreach (var id in variableSetIDs)
            {
                baseResourceList.Add(_connection.Repository.VariableSets.Get(id));
            }

            //This doesn't work and throws: [Exception thrown: 'Octopus.Client.Exceptions.OctopusResourceNotFoundException' in Octopus.Client.dll]
            //Github issue for this https://github.com/OctopusDeploy/Issues/issues/3307
            //baseResourceList.AddRange(_connection.Repository.VariableSets.Get(variableSetIDs.ToArray()));

            if (ResourceOnly)
            {
                if (baseResourceList.Count == 1)
                {
                    WriteObject(baseResourceList.FirstOrDefault(), true);
                }
                else
                {
                    WriteObject(baseResourceList, true);
                }
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusVariableSet(baseResourceList, projectList, libraryVariableSetList, IncludeUsage);

                if (outputList.Count == 1)
                {
                    WriteObject(outputList.FirstOrDefault(), true);
                }
                else
                {
                    WriteObject(outputList, true);
                }
            }
        }
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <ReleaseResource>();

            var project = _connection.Repository.Projects.FindByName(ProjectName);

            if (project == null)
            {
                throw OctoposhExceptions.ResourceNotFound(ProjectName, "Project");
            }
            else
            {
                switch (ParameterSetName)
                {
                case ByVersion:
                    foreach (var version in ReleaseVersion)
                    {
                        try
                        {
                            baseResourceList.Add(_connection.Repository.Projects.GetReleaseByVersion(project, version));
                        }
                        catch (Exception e)
                        {
                            WriteError(new ErrorRecord(e, "ResourceNotFound", ErrorCategory.ObjectNotFound, e.Message));
                        }
                    }
                    break;

                case ByLatest:

                    var releases = new List <ReleaseResource>();

                    if (Latest > 30)
                    {
                        releases = _connection.Repository.Projects.GetAllReleases(project).ToList();
                    }
                    else
                    {
                        releases = _connection.Repository.Projects.GetReleases(project).Items.ToList();
                    }

                    if (releases.Count > Latest)
                    {
                        baseResourceList.AddRange(releases.GetRange(0, Latest));
                    }
                    else
                    {
                        baseResourceList.AddRange(releases);
                    }

                    break;

                default:
                    baseResourceList.AddRange(_connection.Repository.Projects.GetAllReleases(project).ToList());
                    break;
                }
            }

            if (ResourceOnly)
            {
                WriteObject(baseResourceList);
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusRelease(baseResourceList);

                WriteObject(outputList);
            }
        }
Beispiel #16
0
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <MachineResource>();

            switch (ParameterSetName)
            {
            case All:
                baseResourceList = _connection.Repository.Machines.FindAll();
                break;

            case ByName:
                var machineNameList = MachineName?.ToList().ConvertAll(s => s.ToLower());

                //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                if (machineNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && machineNameList.Count > 1))
                {
                    throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("MachineName");
                }
                //Only 1 wildcarded value (ie -MachineName WebServer*)
                else if (machineNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && machineNameList.Count == 1))
                {
                    var pattern = new WildcardPattern(machineNameList.First());
                    baseResourceList = _connection.Repository.Machines.FindMany(x => pattern.IsMatch(x.Name.ToLower()));
                }
                //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                else if (!machineNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item)))
                {
                    baseResourceList = _connection.Repository.Machines.FindMany(x => machineNameList.Contains(x.Name.ToLower()));
                }
                break;

            case ByUrl:

                var urlList = URL.ToList().ConvertAll(s => s.ToLower());

                //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -URL http://Tentacle*, http://Database1)
                if (urlList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && urlList.Count > 1))
                {
                    throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("URL");
                }
                //Only 1 wildcarded value (ie -URL http://Tentacle*)
                else if (urlList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && urlList.Count == 1))
                {
                    var pattern = new WildcardPattern(urlList.First());
                    baseResourceList = _connection.Repository.Machines.FindMany(x => pattern.IsMatch(x.Uri));
                }
                //multiple non-wildcared values (i.e. -URL http://Tentacle ,http://Database)
                else if (!urlList.Any(item => WildcardPattern.ContainsWildcardCharacters(item)))
                {
                    baseResourceList = _connection.Repository.Machines.FindMany(x => urlList.Contains(x.Uri));
                }
                break;

            case ByCommunicationStyle:

                var endpointtype = "";

                switch (CommunicationStyle)
                {
                case "Polling":
                    endpointtype = "Octopus.Client.Model.Endpoints.PollingTentacleEndpointResource";
                    break;

                case "Listening":
                    endpointtype = "Octopus.Client.Model.Endpoints.ListeningTentacleEndpointResource";
                    break;

                case "CloudRegion":
                    endpointtype = "Octopus.Client.Model.Endpoints.CloudRegionEndpointResource";
                    break;

                case "OfflineDrop":
                    endpointtype = "Octopus.Client.Model.Endpoints.OfflineDropEndpointResource";
                    break;

                case "SSH":
                    endpointtype = "Octopus.Client.Model.Endpoints.SSHEndpointResource";
                    break;
                }

                baseResourceList = _connection.Repository.Machines.FindMany(x => String.Equals(x.Endpoint.GetType().ToString(), endpointtype, StringComparison.CurrentCultureIgnoreCase));

                break;

            case ByEnvironment:

                var environmentNameList = EnvironmentName.ToList().ConvertAll(s => s.ToLower());

                foreach (var name in environmentNameList)
                {
                    var environment = _connection.Repository.Environments.FindByName(name);
                    baseResourceList.AddRange(_connection.Repository.Environments.GetMachines(environment));
                }
                break;
            }

            if (ResourceOnly)
            {
                WriteObject(baseResourceList);
            }
            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusMachine(baseResourceList);

                WriteObject(outputList);
            }
        }
		void CreateContent(ITextColorWriter output, CachedOutput cachedOutput, bool highlight) {
			var conv = new OutputConverter(output);
			foreach (var t in cachedOutput.data)
				conv.Write(t.Item1, t.Item2);
		}
        public void ShouldThrowErrorForInvalidInput()
        {
            var input = new[] { 0 };

            Assert.Throws <ArgumentException>(() => OutputConverter.Convert(input));
        }
Beispiel #19
0
		void Write(CachedOutput co) {
			var conv = new OutputConverter(output);
			foreach (var t in co.data)
				conv.Write(t.Item1, t.Item2);
		}
Beispiel #20
0
 public Tester(NeuralNetwork neuralNetwork, OutputConverter outputConverter)
 {
     this.neuralNetwork   = neuralNetwork;
     this.outputConverter = outputConverter;
 }
        protected override void ProcessRecord()
        {
            var baseResourceList = new List <FeedResource>();

            switch (ParameterSetName)
            {
            case All:
                baseResourceList = _connection.Repository.Feeds.FindAll();
                break;

            case ByName:
                //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                if (_feedNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && _feedNameList.Count > 1))
                {
                    throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("FeedName");
                }
                //Only 1 wildcarded value (ie -MachineName WebServer*)
                else if (_feedNameList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && _feedNameList.Count == 1))
                {
                    var pattern = new WildcardPattern(_feedNameList.First());
                    baseResourceList = _connection.Repository.Feeds.FindMany(t => pattern.IsMatch(t.Name.ToLower()));
                }
                //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                else if (!_feedNameList.Any(WildcardPattern.ContainsWildcardCharacters))
                {
                    baseResourceList = _connection.Repository.Feeds.FindMany(t => _feedNameList.Contains(t.Name.ToLower()));
                }
                break;

            case ByUrl:
                //Multiple values but one of them is wildcarded, which is not an accepted scenario (I.e -MachineName WebServer*, Database1)
                if (_urlList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && _urlList.Count > 1))
                {
                    throw OctoposhExceptions.ParameterCollectionHasRegularAndWildcardItem("URL");
                }
                //Only 1 wildcarded value (ie -MachineName WebServer*)
                else if (_urlList.Any(item => WildcardPattern.ContainsWildcardCharacters(item) && _urlList.Count == 1))
                {
                    var pattern = new WildcardPattern(_urlList.First());
                    baseResourceList = _connection.Repository.Feeds.FindMany(t => pattern.IsMatch(t.FeedUri.ToLower()));
                }
                //multiple non-wildcared values (i.e. -MachineName WebServer1,Database1)
                else if (!_urlList.Any(WildcardPattern.ContainsWildcardCharacters))
                {
                    baseResourceList = _connection.Repository.Feeds.FindMany(t => _urlList.Contains(t.Name.ToLower()));
                }

                break;
            }

            if (ResourceOnly)
            {
                WriteObject(baseResourceList);
            }

            else
            {
                var converter  = new OutputConverter();
                var outputList = converter.GetOctopusFeed(baseResourceList);

                WriteObject(outputList);
            }
        }