Class IPAddressLocationManager
Provides the APIs for finding IP address locations in a persistance store.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public class IPAddressLocationManager
Constructors
IPAddressLocationManager(IIPAddressLocationStore, ICache<IPAddressLocationManager.IPAddressLocationCacheInfo>, IOptions<ExtendedIdentityOptions>, IHttpContextAccessor, ILogger<IPAddressLocationManager>)
Constructs a new instance of IPAddressLocationManager.
Declaration
public IPAddressLocationManager(IIPAddressLocationStore store, ICache<IPAddressLocationManager.IPAddressLocationCacheInfo> cache, IOptions<ExtendedIdentityOptions> optionsAccessor, IHttpContextAccessor contextAccessor, ILogger<IPAddressLocationManager> logger)
Parameters
IIPAddressLocationStore
store
The persistence store the manager will operate over. |
ICache<IPAddressLocationManager.IPAddressLocationCacheInfo>
cache
The cache used for caching IPAddressLocation. |
Microsoft.Extensions.Options.IOptions<ExtendedIdentityOptions>
optionsAccessor
The accessor used to access the ExtendedIdentityOptions. |
Microsoft.AspNetCore.Http.IHttpContextAccessor
contextAccessor
The accessor used to access the Microsoft.AspNetCore.Http.HttpContext. |
Microsoft.Extensions.Logging.ILogger<IPAddressLocationManager>
logger
The logger used to log messages, warnings and errors. |
Properties
CancellationToken
The cancellation token used to cancel operations.
Declaration
protected virtual CancellationToken CancellationToken { get; }
Property Value
System.Threading.CancellationToken
|
Logger
Gets the Microsoft.Extensions.Logging.ILogger used to log messages from the manager.
Declaration
public virtual ILogger Logger { get; set; }
Property Value
Microsoft.Extensions.Logging.ILogger
|
Options
The ExtendedIdentityOptions used to configure Identity.
Declaration
public ExtendedIdentityOptions Options { get; set; }
Property Value
ExtendedIdentityOptions
|
Store
Gets the persistence store this instance operates over.
Declaration
protected IIPAddressLocationStore Store { get; }
Property Value
IIPAddressLocationStore
|
Methods
FindLocationAsync(IPAddress)
Finds the IPAddressLocation that matches the remoteIpAddress
.
Declaration
public async Task<IPAddressLocation> FindLocationAsync(IPAddress remoteIpAddress)
Parameters
IPAddress
remoteIpAddress
The remote IPAddress to get the location for. |
Returns
System.Threading.Tasks.Task<IPAddressLocation>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IPAddressLocation. |