private async void toasterWatcher_Added(toasterWatcher sender, AllJoynServiceInfo args) { toasterJoinSessionResult joinResult = await toasterConsumer.JoinSessionAsync(args, sender); if (joinResult.Status == AllJoynStatus.Ok) { _toasterConsumer = joinResult.Consumer; _toasterConsumer.Signals.ToastDoneReceived += ToastDoneReceived_Signal; RetrieveDarkness(); } else { System.Diagnostics.Debug.WriteLine("Joining the session went wrong"); } }
private void StartWatcher() { toasterWatcher _toasterWatcher = new toasterWatcher(toasterBusAttachment); _toasterWatcher.Added += toasterWatcher_Added; _toasterWatcher.Start(); }