将数据传递给BackgroundServiceAgent
我有两个项目,其中一个是“Windows Phone应用程序”,另一个是“Windows Phone音频播放器代理”。
为了向 AudioPlayer 提供“下一首曲目”之类的内容,我需要一种在应用程序和代理之间进行通信的方法。
我的第一次尝试是单例,我不知道到底为什么,但他们都创建了自己的单例实例。
那么最好/最简单的沟通方式是什么?
I have two projects, one of them is a "Windows phone application" and the other is a "Windows phone Audio player Agent".
In order to provide the AudioPlayer with something like "the next track" I need a way to communicate between my application and the agent.
My first attempt was a singleton, I don't know exactly why, but both of them create their own instance of the singleton.
So what is the best/easiest way to communicate ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关音频代理的 MSDN 示例解释了具体如何做到这一点。
The MSDN Sample about Audio Agents explains precisely how to do this.