BuildServerUploaderConsole.Sftp.SftpManager.GetList C# (CSharp) Метод

GetList() публичный статический Метод

public static GetList ( string host, string folder, string userName, string password ) : IEnumerable
host string
folder string
userName string
password string
Результат IEnumerable
        public static IEnumerable<SftpFile> GetList(string host, string folder, string userName, string password)
        {

            using (var sftp = new SftpClient(host, userName, password))
            {
                sftp.ErrorOccurred += Sftp_ErrorOccurred;
                sftp.Connect();

                var toReturn = sftp.ListDirectory(folder).ToList();

                sftp.Disconnect();

                return toReturn;
            }
        }