コード例 #1
0
        /// <summary>
        /// Server constructor.
        /// </summary>
        /// <param name="logger">ILogging interface implementation</param>
        /// <param name="controller">ILogging interface implementation</param>
        /// <returns>
        /// </returns>
        /// <remarks>
        /// </remarks>
        private void CreateHandler(string directory)
        {
            IHandler h = new DirectoryHandler(controller, logger);

            h.StartHandleDirectory(directory);
            CommandReceived  += h.OnCommandReceived;
            h.DirectoryClose += NotifyClientsDirectoryClosed;
        }
コード例 #2
0
        /// <summary>
        /// Creating handlers and adding them to the event listener
        /// </summary>
        /// <param name="directory"> the handler directory</param>
        public void CreateHandler(string directory)
        {
            IDirectoryHandler handler = new DirectoryHandler(this.imageController, this.logger);

            handler.StartHandleDirectory(directory);
            onCommand              += handler.OnCommandRecieved;
            informHandlerClose     += handler.CloseHandler;
            handler.DirectoryClose += OnCloseServer;
        }