/// <summary> /// Called when the local medium has arrived. /// </summary> async void StartedWatching(IMediumWatcher watcher, Medium medium) { // Start session handler SessionHandler = new SessionHandler(APIKey); SessionHandler.StateUpdated += SessionHandler_StateUpdated; var session = await SessionHandler.Init(); // Start contents handler _contentsHandler = new ContentsHandler(session); }
public SessionStatus(SessionHandler sessionHandler) { this.State = Enum.GetName(typeof(ConnectionState), sessionHandler.Session.ConnectionState).ToUnderscore(); this.Username = sessionHandler.Session.ConnectionState == ConnectionState.LoggedIn ? sessionHandler.Session.UserName : null; }
void SessionHandler_StateUpdated(SessionHandler sender) { this.SendStatus(); }