public ContactStoreForContactLinking(MailboxSession mailboxSession, IContactLinkingPerformanceTracker performanceTracker)
 {
     Util.ThrowOnNullArgument(mailboxSession, "mailboxSession");
     Util.ThrowOnNullArgument(performanceTracker, "performanceTracker");
     this.MailboxSession     = mailboxSession;
     this.performanceTracker = performanceTracker;
 }
 public void Commit(IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker)
 {
     if (this.isDirty)
     {
         this.UpdateContact(logger, performanceTracker);
         this.isDirty = false;
         logger.LogEvent(new SchemaBasedLogEvent <ContactLinkingLogSchema.ContactUpdate>
         {
             {
                 ContactLinkingLogSchema.ContactUpdate.ItemId,
                 this.ItemId
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.PersonId,
                 this.PersonId
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.Linked,
                 this.linked
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.LinkRejectHistory,
                 this.linkRejectHistory
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.GALLinkState,
                 this.galLinkState
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.GALLinkID,
                 this.galLinkID
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.AddressBookEntryId,
                 this.addressBookEntryId
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.SmtpAddressCache,
                 this.smtpAddressCache
             },
             {
                 ContactLinkingLogSchema.ContactUpdate.UserApprovedLink,
                 this.userApprovedLink
             }
         });
     }
 }
Esempio n. 3
0
 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();
 }
 internal BulkAutomaticLink(MailboxInfoForLinking mailboxInfo, ContactLinkingLogger logger, IContactLinkingPerformanceTracker performanceTracker, IDirectoryPersonSearcher directoryPersonSearcher, ContactStoreForBulkContactLinking contactStoreForBulkContactLinking)
 {
     Util.ThrowOnNullArgument(mailboxInfo, "mailboxInfo");
     Util.ThrowOnNullArgument(logger, "logger");
     Util.ThrowOnNullArgument(performanceTracker, "performanceTracker");
     Util.ThrowOnNullArgument(directoryPersonSearcher, "directoryPersonSearcher");
     Util.ThrowOnNullArgument(contactStoreForBulkContactLinking, "contactStoreForBulkContactLinking");
     this.logger             = logger;
     this.performanceTracker = performanceTracker;
     this.contactStore       = contactStoreForBulkContactLinking;
     this.automaticLink      = new AutomaticLink(mailboxInfo, this.logger, this.performanceTracker, directoryPersonSearcher, this.contactStore);
 }
Esempio n. 5
0
 public ManualLink(MailboxInfoForLinking mailboxInfo, IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker) : base(mailboxInfo, logger, performanceTracker)
 {
 }
 protected abstract void UpdateContact(IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker);
Esempio n. 7
0
 public AutomaticLink(MailboxInfoForLinking mailboxInfo, IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker, IDirectoryPersonSearcher directoryPersonSearcher, IContactStoreForContactLinking contactStoreForContactLinking) : base(mailboxInfo, logger, performanceTracker)
 {
     Util.ThrowOnNullArgument(directoryPersonSearcher, "directoryPersonSearcher");
     Util.ThrowOnNullArgument(contactStoreForContactLinking, "contactStoreForContactLinking");
     Util.ThrowOnNullArgument(performanceTracker, "performanceTracker");
     this.directoryPersonSearcher       = directoryPersonSearcher;
     this.contactStoreForContactLinking = contactStoreForContactLinking;
 }
Esempio n. 8
0
 protected ContactLink(MailboxInfoForLinking mailboxInfo, IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker)
 {
     Util.ThrowOnNullArgument(mailboxInfo, "mailboxInfo");
     Util.ThrowOnNullArgument(logger, "logger");
     Util.ThrowOnNullArgument(performanceTracker, "performanceTracker");
     this.mailboxInfo        = mailboxInfo;
     this.logger             = logger;
     this.performanceTracker = performanceTracker;
 }
 protected override void UpdateContact(IExtensibleLogger logger, IContactLinkingPerformanceTracker performanceTracker)
 {
     base.UpdateContact(logger, performanceTracker);
     base.SetLinkingProperties(PropertyBagAdaptor.Create(this.WritablePropertyBag));
 }
Esempio n. 10
0
 public ContactStoreForCowContactLinking(MailboxSession mailboxSession, IContactLinkingPerformanceTracker performanceTracker) : base(mailboxSession, performanceTracker)
 {
 }
Esempio n. 11
0
 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);
 }