public static ContactInfoForLinkingFromPropertyBag Create(MailboxSession mailboxSession, IStorePropertyBag propertyBag) { Util.ThrowOnNullArgument(mailboxSession, "mailboxSession"); Util.ThrowOnNullArgument(propertyBag, "propertyBag"); PropertyBagAdaptor propertyBagAdaptor = PropertyBagAdaptor.Create(propertyBag); return(new ContactInfoForLinkingFromPropertyBag(propertyBagAdaptor, mailboxSession, propertyBag)); }
public static ContactInfoForLinkingFromCoreObject Create(ICoreItem coreObject) { Util.ThrowOnNullArgument(coreObject, "coreObject"); coreObject.PropertyBag.Load(ContactInfoForLinking.Properties); PropertyBagAdaptor propertyBagAdaptor = PropertyBagAdaptor.Create(coreObject); return(new ContactInfoForLinkingFromCoreObject(propertyBagAdaptor, coreObject)); }
public static ContactInfoForLinkingWithPropertyBagUpdater Create(MailboxSession mailboxSession, IStorePropertyBag propertyBag, ICollection <PropertyDefinition> loadedProperties) { Util.ThrowOnNullArgument(mailboxSession, "mailboxSession"); Util.ThrowOnNullArgument(propertyBag, "propertyBag"); Util.ThrowOnNullArgument(loadedProperties, "loadedProperties"); PropertyBagAdaptor propertyBagAdaptor = PropertyBagAdaptor.Create(propertyBag); return(new ContactInfoForLinkingWithPropertyBagUpdater(propertyBagAdaptor, mailboxSession, propertyBag, loadedProperties)); }
protected override void UpdateContact(IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker) { ContactInfoForLinking.Tracer.TraceDebug <VersionedId, string>((long)this.GetHashCode(), "ContactInfoForLinkingFromPropertyBag.UpdateContact: setting link properties AND saving contact with id = {0}; given-name: {1}", base.ItemId, base.GivenName); base.RetryOnTransientExceptionCatchObjectNotFoundException(logger, "update of contact Id=" + base.ItemId, delegate { using (Contact contact = Contact.Bind(this.mailboxSession, base.ItemId, new PropertyDefinition[] { ContactSchema.PersonId })) { base.SetLinkingProperties(PropertyBagAdaptor.Create(contact)); AutomaticLink.DisableAutomaticLinkingForItem(contact); contact.Save(SaveMode.NoConflictResolution); } }); performanceTracker.IncrementContactsUpdated(); }
protected override void UpdateContact(IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker) { base.UpdateContact(logger, performanceTracker); base.SetLinkingProperties(PropertyBagAdaptor.Create(this.WritablePropertyBag)); }
protected override void UpdateContact(IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker) { base.SetLinkingProperties(PropertyBagAdaptor.Create(this.coreObject)); ContactInfoForLinking.Tracer.TraceDebug <VersionedId, string>((long)this.GetHashCode(), "ContactInfoForLinkingFromCoreObject.UpdateContact: setting link properties but not saving contact with id = {0}; given-name: {1}", base.ItemId, base.GivenName); }