/// <summary> /// This method is used to record the exclusive lock status with specified exclusive lock ID for the file URL. /// </summary> /// <param name="fileUrl">Specify the file URL which get the exclusive lock.</param> /// <param name="exclusiveId">Specify the exclusive lock ID of the exclusive lock.</param> /// <param name="userName">Specify the user name of the user who calls cell storage service.</param> /// <param name="password">Specify the password of the user who calls cell storage service.</param> /// <param name="domain">Specify the domain of the user who calls cell storage service.</param> public void RecordExclusiveLock(string fileUrl, string exclusiveId, string userName, string password, string domain) { Action function = () => { ExclusiveLockSubRequestType coauthLockRequest = new ExclusiveLockSubRequestType(); coauthLockRequest.SubRequestToken = SequenceNumberGenerator.GetCurrentToken().ToString(); coauthLockRequest.SubRequestData = new ExclusiveLockSubRequestDataType(); coauthLockRequest.SubRequestData.ExclusiveLockRequestType = ExclusiveLockRequestTypes.ReleaseLock; coauthLockRequest.SubRequestData.ExclusiveLockRequestTypeSpecified = true; coauthLockRequest.SubRequestData.ExclusiveLockID = exclusiveId; IMS_FSSHTTP_FSSHTTPBAdapter adapter = site.GetAdapter<IMS_FSSHTTP_FSSHTTPBAdapter>(); this.intializeContext(fileUrl, userName, password, domain); CoauthSubResponseType subResponse = SharedTestSuiteHelper.ExtractSubResponse<CoauthSubResponseType>(adapter.CellStorageRequest(fileUrl, new SubRequestType[] { coauthLockRequest }), 0, 0, site); if (!string.Equals("Success", subResponse.ErrorCode, StringComparison.OrdinalIgnoreCase)) { this.errorMessage.Add(string.Format("Failed to release the exclusive lock for the exclusive lock id {1} on the file {0} using the following user: {2}/{3}and password:{4}", fileUrl, exclusiveId, userName, domain, password)); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(fileUrl, function, KeyStatus.ExclusiveLock); }