private IList <ContactInfoForLinking> QueryPersonContacts(MailboxSession mailboxSession, PersonId personId) { List <ContactInfoForLinking> list = new List <ContactInfoForLinking>(); AllPersonContactsEnumerator allPersonContactsEnumerator = AllPersonContactsEnumerator.Create(mailboxSession, personId, ContactInfoForLinking.Properties); foreach (IStorePropertyBag propertyBag in allPersonContactsEnumerator) { base.PerformanceTracker.IncrementContactsRead(); list.Add(ContactInfoForLinkingFromPropertyBag.Create(mailboxSession, propertyBag)); } return(list); }
public override IEnumerable <ContactInfoForLinking> GetPersonContacts(PersonId personId) { Util.ThrowOnNullArgument(personId, "personId"); List <ContactInfoForLinking> list = new List <ContactInfoForLinking>(10); IEnumerable <IStorePropertyBag> enumerable = AllPersonContactsEnumerator.Create(this.MailboxSession, personId, ContactInfoForLinking.Properties); foreach (IStorePropertyBag propertyBag in enumerable) { list.Add(base.CreateContactInfoForLinking(propertyBag)); } return(list); }