Example #1
0
 /// <summary>
 /// This is the constractor of ClientManager.
 /// </summary>
 /// <param name="imageController">The image controller that controls the service data.</param>
 /// <param name="logging">The iloggingSerive that sends thr logs generated by the service.</param>
 public ClientHandler(IImageController imageController, ILoggingService logging)
 {
     this.client              = null;
     this.stream              = null;
     this.reader              = null;
     this.writer              = null;
     this.controller          = imageController;
     this.isListeningToLogger = false;
     this.logger              = logging;
     logNum         = 0;
     this.confModal = new ConfigurationModal();
 }
Example #2
0
        private ILoggingService logger;              // delete
        public ImageController(IImageServiceModal modal, LogingBuffer logsBuffer, ILoggingService logger)
        {
            m_modal            = modal;         // Storing the Modal Of The System
            this.loggingBuffer = logsBuffer;
            this.logger        = logger;
            ConfigurationModal config = new ConfigurationModal();

            commands = new Dictionary <int, ICommand>()
            {
                // For Now will contain NEW_FILE_COMMAND
                { (int)CommandEnum.NewFileCommand, new NewFileCommand(m_modal) },
                { (int)CommandEnum.LogCommand, new GetLogsCommand(logsBuffer, this.logger) },
                { (int)CommandEnum.GetConfigCommand, new GetConfigCommand(config) },
                { (int)CommandEnum.RemoveDirectoryFromConfigurationCommand, new RemoveDirectoryFromConfigurationCommand(config) }
            };
        }
Example #3
0
 /// <summary>
 /// This is the constractor of GetConfigCommand.
 /// </summary>
 /// <param name="configModal">The configuration model that stores the conciguration, this command will work with.</param>
 public GetConfigCommand(ConfigurationModal configModal)
 {
     this.config = configModal;
 }
Example #4
0
 /// <summary>
 /// This is the constractor of RemoveDirectoryFromConfigurationCommand.
 /// </summary>
 /// <param name="configModal">The configuration model that stores the conciguration, this command will work with.</param>
 public RemoveDirectoryFromConfigurationCommand(ConfigurationModal configModal)
 {
     this.config = configModal;
 }