private void SendCustomerCDCEvent(CustomerCDCRecord cdc)
        {
            var customerEvent = default(CustomerNotificationEvent);

            switch (cdc.Operation)
            {
            case CDCOperation.Delete:
                customerEvent = new CustomerNotificationEvent
                {
                    CDCEventType  = CDCEventTypeEnum.Delete,
                    CustomerEvent = GetCustomerProperties(cdc)
                };
                break;

            case CDCOperation.Insert:
                customerEvent = new CustomerNotificationEvent
                {
                    CDCEventType  = CDCEventTypeEnum.Insert,
                    CustomerEvent = GetCustomerProperties(cdc)
                };
                break;

            case CDCOperation.UpdateBeforeChange:
                break;

            case CDCOperation.UpdateAfterChange:
            case CDCOperation.Upsert:

                customerEvent = new CustomerNotificationEvent
                {
                    CDCEventType  = CDCEventTypeEnum.Upsert,
                    CustomerEvent = GetCustomerProperties(cdc)
                };
                break;
            }

            // publish Event
            if (customerEvent != default(CustomerNotificationEvent))
            {
                var args = new CustomerCDCEventArgs <CustomerNotificationEvent>(customerEvent);
                HandleCustomerNotificationEvent?.Invoke(this, args);
            }
        }
 private void CustomerDataChangeDetector_HandleCustomerNotificationEvent(object sender, Events.CustomerCDCEventArgs <Events.CustomerNotificationEvent> e)
 {
     HandleCustomerNotificationEvent?.Invoke(this, e);
 }