0

我正在处理推送通知并有一个HttpNotificationChannel pushChannel对象。

在 OnNavigatedTo 我做一个pushChannel.HttpNotificationReceived += ...

在我的 MainPage 的 OnNavigatedFrom 中,我有pushChannel.HttpNotificationReceived -= ...

但是我可以在没有定义 pushChannel 的情况下做到这一点吗?喜欢pushChannel = HttpNotificationChannel.Find(channelName);

当然这没有任何意义,但我很好奇我是否可以分配和取消分配这样的事件

4

0 回答 0