protected override void OnStart() { _mcuWatcher = new MCUWatcher(this.CreateBusAttachment(ref _mcuBusAttachment)); _mcuWatcher.Added += this.MCUWatcher_Added; _mcuWatcher.Start(); _mediaPlayerWatcher = new MediaPlayerWatcher(this.CreateBusAttachment(ref _mediaPlayerBusAttachment)); _mediaPlayerWatcher.Added += this.MediaPlayerWatcher_Added; _mediaPlayerWatcher.Start(); }
private async void MCUWatcher_Added(MCUWatcher sender, AllJoynServiceInfo args) { var joinResult = await MCUConsumer.JoinSessionAsync(args, sender); if (joinResult.Status == AllJoynStatus.Ok) { _mcuConsumer = joinResult.Consumer; _mcuConsumer.SessionLost += this.Consumer_SessionLost; // subscribe to value changes // populate initial values this.IsConnected = true; } }