/// <summary> /// ClientHandler constructor. /// </summary> /// <param name="imageController">IImageController obj</param> /// <param name="logging">ILoggingService obj</param> public ClientHandler(IImageController m_imageController, ILoggingService logging)//, ImageServer imageServer) { this.imageController = m_imageController; this.Logging = logging; this.Logging.MessageRecieved += send; Console.WriteLine("ClientHandlerconstructor"); dp = new Debug_program(); }
public ISServer(int port, ILoggingService logging, IClientHandler ch) { this.port = port; this.Logging = logging; this.ch = ch; ClientHandler.Mutex = m_mutex; dp = new Debug_program(); }
//checks if extension exist in extensionsToListen. if yes-use CommandRecievedEventArgs to notice. private void OnChanged(object o, FileSystemEventArgs comArgs) { // debug.write("OnChanged"); string argsFullPath = comArgs.FullPath; Debug_program debug = new Debug_program(); debug.write(comArgs.FullPath); string[] args = { comArgs.FullPath }; string fileExtension = Path.GetExtension(argsFullPath); // debug.write(fileExtension); if (extensionsToListen.Contains("*" + fileExtension)) { CommandRecievedEventArgs commandArgs = new CommandRecievedEventArgs((int)CommandEnum.NewFileCommand, args, fileExtension); OnCommandRecieved(this, commandArgs); } }