Stall.Program.OptMain C# (CSharp) Method

OptMain() static private method

static private OptMain ( Options opts ) : int
opts Options
return int
        static int OptMain(Options opts)
        {
            var status = opts.Status;
            if (status != null)
                return RaiseError(status.Code, status.Message ?? Constants.Usage);

            switch (opts.IntendedUsage)
            {
                case Usage.Remove:
                    return RemoveMain(opts);
                case Usage.Install:
                    return InstallMain(opts);
                case Usage.Hide:
                    return HideMain(opts);
                default:
                    throw new NotImplementedException("Not implemented yet.");
            }
        }