Ejemplo n.º 1
0
        private TargetFtpConfig CreateTargetFtp(TargetCommand command, FtpConfig ftp)
        =>
        new TargetFtpConfig
        {
            Host     = ftp.Host,
            Port     = ftp.Port,
            User     = ftp.User,
            Password = ftp.Password,

            Name      = ftp.Name,
            Directory = command.Target.Directory
        };
Ejemplo n.º 2
0
        private FtpConfig ParseFtp(KeyValuePair <string, string> command, List <string> parameters)
        {
            var options = ParseDictonary(parameters);

            var result = new FtpConfig
            {
                Name     = command.Value,
                Host     = options.GetIfHasKey("Host"),
                User     = options.GetIfHasKey("User"),
                Password = options.GetIfHasKey("Password")
            };

            return(result);
        }