AzureCosmosDbCreateIpAddressStatusAutomatically Method

Creates an IP Address Status in the database from Login.cshtml.cs

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public Task<IpAddressStatusDto> CreateIpAddressStatusAutomatically(
	IpAddressStatusDto ipAddressStatus,
	AccountDto createdBy,
	string ipAddress,
	CancellationToken cancellationToken = default
)

Parameters

ipAddressStatus  IpAddressStatusDto
IP white/blacklist entry to create
createdBy  AccountDto
User who, by logging in, caused the new IP Address Status
ipAddress  String
The IP Address of createdBy
cancellationToken  CancellationToken  (Optional)
Cancellation token (optional)

Return Value

TaskIpAddressStatusDto
Cosmos DB Object-creation Task

Implements

IAzureCosmosDbCreateIpAddressStatusAutomatically(IpAddressStatusDto, AccountDto, String, CancellationToken)

Exceptions

ArgumentNullExceptionThrown if ipAddressStatus or createdBy was
ArgumentExceptionThrown if ipAddress is IsNullOrWhiteSpace(String)
ResourceInvalidStateExceptionThrown if ipAddressStatus is in an invalid state.

See Also