예제 #1
0
        private async Task QueryDetail(string id)
        {
            UserContentProvider user = new UserContentProvider();

            NoteDetail = await user.QueryNoteDetail(id, GlobalValue.CurrentUserContext.UserId, GlobalValue.CurrentUserContext.MobileToken);

            Untils.WriteNoteDetial(NoteDetail);
        }
예제 #2
0
 public static bool UpdateNoteDetail(NoteDetailResult noteDetail)
 {
     if (cache.ContainItem(CacheKey.NoteDetail + noteDetail.Id))
     {
         cache.UpdateItem(CacheKey.NoteDetail + noteDetail.Id, noteDetail);
         return(true);
     }
     return(false);
 }
예제 #3
0
        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;
            }
        }
예제 #4
0
        public async Task NoteDetailTest()
        {
            NoteDetailResult result = await NoteDetailResult("7a490fc8a288", null, null);

            Assert.IsNotNull(result);
        }
예제 #5
0
 public static void WriteNoteDetial(NoteDetailResult noteDetail)
 {
     cache.AddItem(CacheKey.NoteDetail + noteDetail.Id, noteDetail);
 }