コード例 #1
0
        public async Task <IEnumerable <ISftpItem> > GetItemsAsync()
        {
            var items = await this.SftpDataSource.SftpClient.ListDirectoryAsync(this.Path);

            return(from item in items
                   orderby item.Name
                   select SftpItemBase.Factory(item, this.SftpDataSource, this.Dispatcher));
        }
コード例 #2
0
        public async Task <ISftpItem> GetItemAsync(string name)
        {
            var item = await Task.Run(() => this.SftpDataSource.SftpClient.Get(Common.CombinePaths(this.Path, name)));

            return(SftpItemBase.Factory(item, this.SftpDataSource, this.Dispatcher));
        }