internal void IncrementAction(MergePurgeAction mpAction)
        {
            switch (mpAction)
            {
            case MergePurgeAction.Add:
                IncAddCount();
                break;

            case MergePurgeAction.Delete:
                IncDeleteCount();
                break;

            case MergePurgeAction.Update:
                IncUpdateCount();
                break;

            default:
                IncIgnoreCount();
                break;
            }
        }
Esempio n. 2
0
        private static void PerformDataActionForPassiveModeWriter(MergePurgeAction dataAction, bool keyFound, DataMode processMode, string detailLine, StreamWriter[] actionWriters)
        {
            StreamWriter actionWriter = null;

            switch (dataAction)
            {
            case MergePurgeAction.Add:
                if (!keyFound)
                {
                    actionWriter = actionWriters[(int)ActionWriter.AddsWriter];
                }
                break;

            case MergePurgeAction.Delete:
                if (keyFound)
                {
                    actionWriter = actionWriters[(int)ActionWriter.DeletesWriter];
                }
                break;

            case MergePurgeAction.Update:
                if (keyFound)
                {
                    actionWriter = actionWriters[(int)ActionWriter.UpdatesWriter];
                }

                break;

            default:
                actionWriter = actionWriters[(int)ActionWriter.IgnoredWriter];
                break;
            }

            if (actionWriter != null)
            {
                PassiveModeWriter(processMode, actionWriter, detailLine);
            }
        }