private async Task QueryDetail(string id) { UserContentProvider user = new UserContentProvider(); NoteDetail = await user.QueryNoteDetail(id, GlobalValue.CurrentUserContext.UserId, GlobalValue.CurrentUserContext.MobileToken); Untils.WriteNoteDetial(NoteDetail); }
public static bool UpdateNoteDetail(NoteDetailResult noteDetail) { if (cache.ContainItem(CacheKey.NoteDetail + noteDetail.Id)) { cache.UpdateItem(CacheKey.NoteDetail + noteDetail.Id, noteDetail); return(true); } return(false); }
private async void QueryDetail(string id) { var temp = Untils.ReadNoteDetial(id); if (temp == null) { UserContentProvider user = new UserContentProvider(); NoteDetail = await user.QueryNoteDetail(id, GlobalValue.CurrentUserContext.UserId, GlobalValue.CurrentUserContext.MobileToken); Untils.WriteNoteDetial(NoteDetail); } else { NoteDetail = temp; } }
public async Task NoteDetailTest() { NoteDetailResult result = await NoteDetailResult("7a490fc8a288", null, null); Assert.IsNotNull(result); }
public static void WriteNoteDetial(NoteDetailResult noteDetail) { cache.AddItem(CacheKey.NoteDetail + noteDetail.Id, noteDetail); }