IAzureCosmosDbUnlockEnvironment Method

Unlocks an EnvironmentDto and its children.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
Task UnlockEnvironment(
	EnvironmentDto environment,
	CompanyDto company,
	UserSessionData unlockedBy,
	bool isImplicitLock,
	CancellationToken cancellationToken = default
)

Parameters

environment  EnvironmentDto
Environment to unlock
company  CompanyDto
CompanyDto owning the EnvironmentDto
unlockedBy  UserSessionData
User locking the EnvironmentDto
isImplicitLock  Boolean
True if environment was locked implicitly
cancellationToken  CancellationToken  (Optional)
Cancellation token

Return Value

Task
Task completion

Exceptions

UnauthorizedAccessExceptionThrown if the user unlockedBy did not have the correct permissions
InvalidOperationException Thrown if the environment we're trying to lock is the MainEnvironment of the company
ArgumentNullExceptionThrown if environment, company or unlockedBy was

See Also