Stall.Program.RemoveMain C# (CSharp) Method

RemoveMain() static private method

static private RemoveMain ( Options opts ) : int
opts Options
return int
        static int RemoveMain(Options opts)
        {
            var appsPresent = opts.ToRemove.AsEnumerable();
            foreach (var key in GetUninstallBaseKeys())
            {
                appsPresent = key.RemoveApps(appsPresent);

                if (appsPresent.Count() == 0)
                    return 0;
            }

            // Couldn't remove all the apps
            string joined = string.Join(", ", appsPresent);
            return RaiseError(Errors.RemoveFailed, $"Unable to remove these apps: {joined}");
        }