public CommandHandlerInstanceInformation(IFtpCommandHandler commandHandler, string name)
 {
     Name            = name;
     IsLoginRequired = commandHandler.IsLoginRequired;
     IsAbortable     = commandHandler.IsAbortable;
     Type            = commandHandler.GetType();
     IsExtensible    = commandHandler is IFtpCommandHandlerExtensionHost;
     Instance        = commandHandler;
 }
Ejemplo n.º 2
0
        public FtpHandler(IFtpCommandHandler handler, NetworkStream stream,
                          MessageLogger messageLogger, IDataLogger dataLogger)
        {
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            if (stream == null)
            {
                throw new ArgumentNullException("null");
            }

            this.handler = handler;
            this.stream  = stream;

            this.messageLogger = (messageLogger == null) ? MessageLogger.NullMessageLogger : messageLogger;
            this.dataLogger    = (dataLogger == null) ? DataLogger.Null : dataLogger;
        }
 public static IEnumerable <IFtpCommandHandlerInstanceInformation> GetInformation(this IFtpCommandHandler commandHandler)
 {
     return(commandHandler.Names.Select(x => new CommandHandlerInstanceInformation(commandHandler, x)));
 }