IAzureCosmosDbUnlockEnvironment Method

Unlocks an EnvironmentDto and its children.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
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