public static MigrationCliInput ParseCliArgs(string[] args)
        {
            var argsAsDictionary = _argsAsDictionary(args);

            var input = new MigrationCliInput
            {
                ShouldPersist      = argsAsDictionary.ContainsKey("-p") && argsAsDictionary["-p"] == "1",
                TreatValueAsNumber = argsAsDictionary.ContainsKey("-tvn") && argsAsDictionary["-tvn"] == "1"
            };

            if (input.ShouldPersist)
            {
                Console.WriteLine($"**PERSISTING**");
            }
            else
            {
                Console.WriteLine($"Previewing, please pass '-p:1' to persist.");
            }

            if (argsAsDictionary.ContainsKey("-f"))
            {
                input.FilterBy = argsAsDictionary["-f"];
            }

            if (argsAsDictionary.ContainsKey("-ncdtpa"))
            {
                input.NestedContentDocTypePropertyAlias = argsAsDictionary["-ncdtpa"];
            }

            if (argsAsDictionary.ContainsKey("-pta"))
            {
                input.PropertyTypeAlias = argsAsDictionary["-pta"];
            }

            if (argsAsDictionary.ContainsKey("-pea"))
            {
                input.PropertyEditorAlias = argsAsDictionary["-pea"];
            }

            if (argsAsDictionary.ContainsKey("-v"))
            {
                input.Value = argsAsDictionary["-v"];
            }

            if (argsAsDictionary.ContainsKey("-udi"))
            {
                var serviceName = argsAsDictionary["-udi"];

                if (string.IsNullOrEmpty(serviceName) || (serviceName != "media" && serviceName != "content"))
                {
                    serviceName = null;
                }
                else
                {
                    input.UdiServiceName = serviceName.ToLower();
                }
            }

            return(input);
        }
        public static List <IContent> FilterBy(this List <IContent> allContent, MigrationCliInput cliInput)
        {
            if (!string.IsNullOrEmpty(cliInput.FilterBy))
            {
                Console.WriteLine($"Filtering for doctype: {cliInput.FilterBy}");

                return(allContent.Where(x => x.ContentType.Alias.ToLower() == cliInput.FilterBy.ToLower()).ToList());
            }

            return(allContent);
        }