Exemplo n.º 1
0
        public bool Process()
        {
            bool returnValue;
            switch (target)
            {
                case Target.Delete:
                {
                    Race race = new Race(args);
                    race.ParseDelete();
                    race.ProcessDelete();
                    returnValue = race.IsValid;
                    break;
                }

                case Target.Rescan:
                    {
                        Rescan rescan = new Rescan(args);
                        rescan.Parse();
                        rescan.Process();
                        returnValue = true;
                        break;
                    }

                case Target.Upload:
                {
                    Race race = new Race(args);
                    race.ParseUpload();
                    race.Process();
                    returnValue = race.IsValid;
                    break;
                }

                default:
                {
                    return false;
                }
            }
            Log.Debug("Script returned code {0}", returnValue);
            return returnValue;
        }