private void collectRewrites(DirectorySynchronizerProgramm result, Action<string> writelog) {
     foreach (var sf in sourcefiles) {
         var tf = adaptSourceNameToTarget(sf.Key);
         var task = new DirectorySynchronizerTask
                        {
                            Command = DirectorySynchronizerCommandType.Create,
                            Source = sf.Key,
                            Target = tf
                        };
         result.Add(task);
     }
 }
 private void collectUpdates(DirectorySynchronizerProgramm result, Action<string> writelog) {
     foreach (var sf in sourcefiles) {
         var tf = adaptSourceNameToTarget(sf.Key);
         if(targetfiles.ContainsKey(tf)) {
             if(targetfiles[tf].LastWriteTime < sf.Value.LastWriteTime) {
                 var task = new DirectorySynchronizerTask
                                {
                                    Command = DirectorySynchronizerCommandType.Update,
                                    Source = sf.Key,
                                    Target = tf
                                };
                 result.Add(task);
             }
         }
     }
 }
 private void collectDeletes(DirectorySynchronizerProgramm result, Action<string> writelog) {
     foreach (var tf in targetfiles) {
         var sf = adaptTargetNameToSource(tf.Key);
         if(!sourcefiles.ContainsKey(sf)) {
             var task = new DirectorySynchronizerTask
                            {
                                Command = DirectorySynchronizerCommandType.Delete,
                                Source = tf.Key,
                                Target = tf.Key,
                            };
             result.Add(task);
         }
     }
 }