Class UserAgentService
- Namespace
- GastroSky.Services.UserAgentService
- Assembly
- GastroSky.dll
Service for handling User-Agent HTTP headers.
public class UserAgentService : IUserAgentService
- Inheritance
-
UserAgentService
- Implements
- Inherited Members
Constructors
UserAgentService(GastroSkyDatabaseContext)
Service for handling User-Agent HTTP headers.
public UserAgentService(GastroSkyDatabaseContext db)
Parameters
Methods
GetOrCreateUserAgentId(HttpContext)
Gets a UserAgent's primary key based on what a client sent into a HttpContext
via the User-Agent HTTP requeest header (or adds it to the DB if no matching row was found).
public Task<long> GetOrCreateUserAgentId(HttpContext httpContext)
Parameters
httpContextHttpContextThe HttpContext of the request that the client sent.