Exemplo n.º 1
0
        public override SyncResult OnDeleteEntry(ExSearchResultEntry entry)
        {
            EhfRecipientTargetConnection.AdminObjectType syncObjectType = this.GetSyncObjectType(entry, "Delete");
            SyncResult result;

            switch (syncObjectType)
            {
            case EhfRecipientTargetConnection.AdminObjectType.MailboxUser:
                this.adminSync.HandleWlidDeletedEvent(entry);
                result = SyncResult.Deleted;
                break;

            case EhfRecipientTargetConnection.AdminObjectType.Organization:
                this.adminSync.HandleOrganizationDeletedEvent(entry);
                result = SyncResult.Deleted;
                break;

            case EhfRecipientTargetConnection.AdminObjectType.UniversalSecurityGroup:
                this.adminSync.HandleGroupDeletedEvent(entry);
                result = SyncResult.Deleted;
                break;

            default:
                throw new InvalidOperationException("EhfRecipientTargetConnection.GetSyncObjectType() returned unexpected value " + syncObjectType);
            }
            return(result);
        }
Exemplo n.º 2
0
        public override SyncResult OnModifyEntry(ExSearchResultEntry entry, SortedList <string, DirectoryAttribute> sourceAttributes)
        {
            SyncResult result = SyncResult.Modified;

            EhfRecipientTargetConnection.AdminObjectType syncObjectType = this.GetSyncObjectType(entry, "Modify");
            switch (syncObjectType)
            {
            case EhfRecipientTargetConnection.AdminObjectType.MailboxUser:
                this.adminSync.HandleWlidChangedEvent(entry);
                break;

            case EhfRecipientTargetConnection.AdminObjectType.Organization:
                this.adminSync.HandleOrganizationChangedEvent(entry);
                break;

            case EhfRecipientTargetConnection.AdminObjectType.UniversalSecurityGroup:
                this.adminSync.HandleGroupChangedEvent(entry);
                break;

            default:
                throw new InvalidOperationException("EhfRecipientTargetConnection.GetSyncObjectType() returned unexpected value " + syncObjectType);
            }
            return(result);
        }