コード例 #1
0
ファイル: WebApiManager.cs プロジェクト: Odin-GSI/FileSync
        public async Task <List <FolderFileState> > GetServerFolderStatusAsync()
        {
            FolderState remoteFolderState = new FolderState();
            string      folderDefinition  = "";

            using (var client = new HttpClient())
            {
                var response = await client.GetAsync(_webApiRULGetFolderStatus + "?syncFolder=" + _remoteSyncFolder);

                folderDefinition = await response.Content.ReadAsStringAsync();
            }

            remoteFolderState.Definition = folderDefinition;

            return(remoteFolderState.RemoteFiles().ToList());
        }
コード例 #2
0
 public FolderFileState RemoteFile(string filename)
 {
     return(_folderState.RemoteFiles()?.FirstOrDefault(x => x.FileName() == filename));
 }