public void Unsubscribe()
        {
            IDeviceEventCallback callback =
                OperationContext.Current.GetCallbackChannel <IDeviceEventCallback>();

            DeviceUpdated -= callback.OnDeviceUpdated;
        }
        public void Subscribe()
        {
            IDeviceEventCallback callback =
                OperationContext.Current.GetCallbackChannel <IDeviceEventCallback>();

            DeviceUpdated += callback.OnDeviceUpdated;
            ICommunicationObject obj = (ICommunicationObject)callback;

            obj.Closed  += new EventHandler(EventService_Closed);
            obj.Closing += new EventHandler(EventService_Closing);
        }