/// <summary>
        /// Syncs the outlook contact.
        /// </summary>
        /// <param name="outlookContact">The outlook contact.</param>
        /// <param name="googleContacts">The google contacts.</param>
        private void SyncOutlookContact(ContactItem outlookContact, IEnumerable<Contact> googleContacts)
        {
            var mergeables = googleContacts.Mergeable(outlookContact).ToList();

            // continue with next, if modificationdate is older then other side.
            if (ApplicationData.ContactBehavior == ContactBehavior.Automatic && mergeables.Any() &&
                outlookContact.LastModificationTime < mergeables.First().ContactEntry.Edited.DateValue)
                return;

            // Get or Create Contact and merge informations
            Contact googleContact;
            var googleGroups = Repository.GoogleData.GetGroups();
            if (mergeables.Any())
            {
                googleContact = mergeables.First();
                var changed = googleContact.MergeWith(outlookContact, googleGroups);
                if (changed)
                    this.Repository.GoogleData.ContactsRequest.Update(googleContact);
            }
            else
            {
                googleContact = new Contact();
                googleContact.MergeWith(outlookContact, googleGroups);
                this.Repository.GoogleData.ContactsRequest.Insert(ApplicationData.GoogleContactsUri, googleContact);
            }

            // Set GoogleId and Picture
            var outlookChanged = outlookContact.UserProperties.SetProperty("GoogleId", googleContact.Id);
            if (ApplicationData.ContactBehavior != ContactBehavior.GoogleOverOutlook && outlookContact.HasNewPicture())
            {
                try
                {
                    this.Repository.GoogleData.ContactsRequest.SetPhoto(googleContact, outlookContact.GetPicture(), "image/jpg");
                    googleContact = this.Repository.GoogleData.ContactsRequest.Retrieve(googleContact);
                    outlookChanged |= outlookContact.UserProperties.SetProperty("GooglePicture", googleContact.PhotoEtag);
                }
                catch (IOException ex)
                {
                    Debug.Write(ex.Message);
                    new EventLogPermission(EventLogPermissionAccess.Administer, ".").PermitOnly();
                    EventLog.WriteEntry("GoogleSync Addin", ex.ToString(), EventLogEntryType.Warning);
                }
                catch (UnauthorizedAccessException ex)
                {
                    Debug.Write(ex.Message);
                    new EventLogPermission(EventLogPermissionAccess.Administer, ".").PermitOnly();
                    EventLog.WriteEntry("GoogleSync Addin", ex.ToString(), EventLogEntryType.Warning);
                }
            }

            if (outlookChanged) outlookContact.Save();
        }