Exemplo n.º 1
0
        private static Task startSession(IServiceProvider services, string sessionKey)
        {
            var clock             = services.GetService <Clock>();
            var startSessionModel = new StartSessionModel
            {
                SessionKey    = sessionKey,
                RemoteAddress = "my-computer",
                UserAgent     = "Windows 10",
                TimeStarted   = clock.Now(),
                UserName      = "******"
            };
            var api = services.GetService <HubAppApi>();

            return(api.PermanentLog.StartSession.Execute(startSessionModel));
        }
Exemplo n.º 2
0
 public Task <ResultContainer <EmptyActionResult> > StartSession([FromBody] StartSessionModel model)
 {
     return(api.Group("PermanentLog").Action <StartSessionModel, EmptyActionResult>("StartSession").Execute(model));
 }