示例#1
0
 public Task GetContactPhoto(Contact contact, bool preview, Action<DisaThumbnail> result)
 {
     return Task.Factory.StartNew(() =>
         {
             result(GetThumbnail(contact.Ids[0].Id, false, preview));
         });
 }
示例#2
0
        public Task FetchBubbleGroup(Contact.ID[] contactIds, Action<BubbleGroup> result)
        {
            return Task.Factory.StartNew(() =>
                {
                    foreach (var group in BubbleGroupManager.FindAll(this))
                    {
                        if (group.IsParty)
                            continue;

                        foreach (var contactId in contactIds)
                        {
                            if (BubbleGroupComparer(contactId.Id, group.Address))
                            {
                                result(group);
                                return;
                            }
                        }
                    }
                        
                    result(null);
                });
        }