Example #1
0
        /// <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);

        }
Example #2
0
 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;
 }
Example #3
0
 void SessionHandler_StateUpdated(SessionHandler sender) {
     this.SendStatus();
 }