示例#1
0
        public static AgentCreateParameter Convert(AgentRegistrationModel self)
        {
            var data = new AgentCreateParameter();

            data.SessionId            = self.SessionId;
            data.HostName             = self.HostName;
            data.RemoteAddress        = self.RemoteAddress;
            data.User                 = self.User;
            data.WebSockerUrl         = self.WebSockerUrl;
            data.PrimaryScreenPreview = self.PrimaryScreenPreview;
            return(data);
        }
示例#2
0
        public Agent Create(AgentCreateParameter p)
        {
            var data = new Agent();

            data.SessionId            = p.SessionId;
            data.HostName             = p.HostName;
            data.RemoteAddress        = p.RemoteAddress;
            data.User                 = p.User;
            data.WebSockerUrl         = p.WebSockerUrl;
            data.PrimaryScreenPreview = p.PrimaryScreenPreview;
            _activeAgents.AddOrUpdate(data.SessionId, data, (k, v) => data);
            return(data);
        }