Ejemplo n.º 1
0
        protected override void ConfigureObjectCollector()
        {
            if (base.ObjectCollector == null)
            {
                var sshExec = ((SSHConnectionProvider)ConnectionProvider).SSHExec;
                var newSSHProvider = new SSHProvider(sshExec);
                var newFileContentCollector =  new FileContentCollector(newSSHProvider);
                var newFileCollector = new FileCollector() { LsCommand = new LsCommand(sshExec) };
                var newUnixFileProvider = new UnixFileProvider(newFileContentCollector, newFileCollector);

                base.ObjectCollector =
                    new TextFileContentObjectCollector()
                    {
                        FileContentProvider = newUnixFileProvider,
                        TargetInfo = this.TargetInfo
                    };

                base.ItemTypeGenerator =
                    new TemporaryItemTypeGenerator()
                    {
                        ObjectCollector = base.ObjectCollector,
                        TargetInfo  = this.TargetInfo
                    };
            }
        }
Ejemplo n.º 2
0
 public FileContentCollector(SSHProvider sshProvider)
 {
     this.SSHProvider = sshProvider;
 }