Exemple #1
0
 public void ProcessMessage(IProcessorMessage message)
 {
     if (message is Message)
     {
         Words = (message as Message).Words;
     }
 }
Exemple #2
0
 public override void ProcessMessage(IProcessorMessage message)
 {
     if (message is ProcessorMessageExit)
     {
         fileSuffixes.Keys.ForEach(n => Logger.WriteLine(Tokens.Info, n + ": " + fileSuffixes[n]));
     }
 }
        public override void ProcessMessage(IProcessorMessage message)
        {
            if (message is ProcessorMessageExit)
            {
                LoggerWriter.WriteLine(Tokens.Info, "Processed " + NumProcessed + " folders and found " + NumSucceeded + " database entries");
            }

            Processor.ProcessMessage(message);
        }
Exemple #4
0
 public virtual void ProcessMessage(IProcessorMessage message)
 {
     if (message is DirectoryProcessor.Message)
     {
         DirectoryProcessor.Message dmsg = message as DirectoryProcessor.Message;
         TrackNumber = dmsg.Index + 1;
         TrackCount  = dmsg.Count;
     }
 }
Exemple #5
0
        public virtual void ProcessMessage(IProcessorMessage message)
        {
            if (message is UndoFileMessage)
            {
                UndoFileMessage msg = message as UndoFileMessage;
                UndoFile = msg.UndoFile;
            }

            Processor.ProcessMessage(message);
        }
Exemple #6
0
 public override void ProcessMessage(IProcessorMessage message)
 {
     if (message is ProcessorMessageExit)
     {
         foreach (FileInfo file in biggestFiles)
         {
             Logger.WriteLine(Tokens.Info, file.FullName + " MB: " + file.Length / (1024 * 1024));
         }
     }
 }
Exemple #7
0
        public override void ProcessMessage(IProcessorMessage message)
        {
            if (message is ProcessorMessageExit)
            {
                tagCollectors.Values.ForEach(n => Logger.Write(Tokens.Info, n));

                if (!invalidTagNames.IsEmpty)
                {
                    Logger.Write(Tokens.Info, invalidTagNames);
                }
            }
        }
 public virtual void ProcessMessage(IProcessorMessage message)
 {
     if (message is UndoFileMessage)
     {
         UndoFile = (message as UndoFileMessage).UndoFile;
     }
     if (message is Message)
     {
         NewName   = (message as Message).NewName;
         Operation = (message as Message).Operation;
         Conflicts = (message as Message).Conflicts;
     }
 }
Exemple #9
0
        public virtual void ProcessMessage(IProcessorMessage msg)
        {
            if (!Object.ReferenceEquals(OnFineProcessor, null))
                OnFineProcessor.ProcessMessage(msg);
            if (!Object.ReferenceEquals(OnBadProcessor, null))
                OnBadProcessor.ProcessMessage(msg);

            if (msg is ProcessorMessageExit && Verbose)
            {
                Logger.WriteLine(Tokens.Info, "Found " + NumberOfBads
                    + " bads and " + NumberOfFines + " good ones!");
            }
        }
 public virtual void ProcessMessage(IProcessorMessage message)
 {
     if (message is UndoFileMessage)
     {
         UndoFileMessage msg = message as UndoFileMessage;
         DryRun   = msg.DryRun;
         UndoFile = msg.UndoFile;
     }
     if (message is Message)
     {
         Pattern = new NamePattern((message as Message).Pattern);
     }
 }
Exemple #11
0
        public override void ProcessMessage(IProcessorMessage message)
        {
            if (message is ProcessorMessageExit)
            {
                List <HistrogramEntry> list = new List <HistrogramEntry>();
                histogramCollector.ForEach(n => list.Add(n.Value));

                list.Sort((x, y) => { return(x.numberOfFiles - y.numberOfFiles); });

                Logger.WriteLine(Tokens.Info, "numberOfFiles, numberOfDirectories, nameOfFirstDirectory");
                list.ForEach(n => Logger.WriteLine(
                                 Tokens.Info,
                                 n.numberOfFiles + " " + n.numberOfDirectories + " " + n.nameOfFirstDirectory));
            }
        }
Exemple #12
0
        public virtual void ProcessMessage(IProcessorMessage message)
        {
            if (message is ProcessorMessageAbort)
            {
                Abort = (message as ProcessorMessageAbort).Abort;
            }
            else if (message is ProcessorMessageQueryAbort)
            {
                if (Abort)
                {
                    (message as ProcessorMessageQueryAbort).Abort = Abort;
                }
            }

            Processor.ProcessMessage(message);
        }
Exemple #13
0
        public void ProcessMessage(IProcessorMessage message)
        {
            if (message is ProcessorMessageExit)
            {
                LoggerWriter.WriteLine(Tokens.Info, "Processed " + NumProcessed + " folders and found " + NumSucceeded + " freedb entries");
            }
            else if (message is ProcessorMessageAbort)
            {
                Abort = (message as ProcessorMessageAbort).Abort;
            }
            else if (message is ProcessorMessageQueryAbort)
            {
                if (Abort)
                {
                    (message as ProcessorMessageQueryAbort).Abort = Abort;
                }
            }

            Processor.ProcessMessage(message);
        }
Exemple #14
0
 public virtual void ProcessMessage(IProcessorMessage message)
 {
     Messages.Add(message);
 }
 public virtual void ProcessMessage(IProcessorMessage message)
 {
     Processor.ProcessMessage(message);
 }
Exemple #16
0
 public QueueConsumer(string queueName, IMessageReceiver messageReceiver, IProcessorMessage processorMessage)
 {
     _queueName        = queueName;
     _messageReceiver  = messageReceiver;
     _processorMessage = processorMessage;
 }
Exemple #17
0
 public virtual void ProcessMessage(IProcessorMessage message)
 {
     Processors.ForEach(n => n.ProcessMessage(message));
 }
 public void ProcessMessage(IProcessorMessage message)
 {
     renamer.ProcessMessage(message);
 }