Exemple #1
0
        public virtual RemoteTerminalInfo Connect(string who)
        {
            m_Who = who ?? Sky.SysConsts.UNKNOWN_ENTITY;
            var now = App.TimeSource.UTCNow;

            m_WhenConnected  = now;
            m_WhenInteracted = now;

            AppRemoteTerminalRegistry.Register(this);

            return(new RemoteTerminalInfo
            {
                TerminalName = Name,
                WelcomeMsg = "Connected to '[{0}]{1}'@'{2}' on {3:G} {4:T} UTC. Session '{5}'".Args(App.AppId.IsZero ? "#" : App.AppId.Value,
                                                                                                    App.Name,
                                                                                                    App.GetThisHostName(),
                                                                                                    App.TimeSource.Now,
                                                                                                    App.TimeSource.UTCNow,
                                                                                                    Name),
                Host = App.GetThisHostName(),
                AppName = App.Name,
                ServerLocalTime = App.TimeSource.Now,
                ServerUTCTime = App.TimeSource.UTCNow
            });
        }
Exemple #2
0
 public void OnDeserialization(object sender) => AppRemoteTerminalRegistry.Register(this);