示例#1
0
        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);
        }
示例#2
0
        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);
        }