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)); }
public Task <ResultContainer <EmptyActionResult> > StartSession([FromBody] StartSessionModel model) { return(api.Group("PermanentLog").Action <StartSessionModel, EmptyActionResult>("StartSession").Execute(model)); }