/// <summary> /// This method is used to record the coauth lock status with specified client ID and schema lock ID for the file URL. /// </summary> /// <param name="fileUrl">Specify the file URL which get the coauth lock.</param> /// <param name="clientId">Specify the client ID of the coauth lock.</param> /// <param name="schemaLockId">Specify the schema ID of the coauth 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 RecordCoauthSession(string fileUrl, string clientId, string schemaLockId, string userName, string password, string domain) { Action function = () => { CoauthSubRequestType coauthLockRequest = new CoauthSubRequestType(); coauthLockRequest.SubRequestToken = SequenceNumberGenerator.GetCurrentToken().ToString(); coauthLockRequest.SubRequestData = new CoauthSubRequestDataType(); coauthLockRequest.SubRequestData.CoauthRequestType = CoauthRequestTypes.ExitCoauthoring; coauthLockRequest.SubRequestData.CoauthRequestTypeSpecified = true; coauthLockRequest.SubRequestData.SchemaLockID = schemaLockId; coauthLockRequest.SubRequestData.ClientID = clientId; 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 leave the coauth session for the client id {1} and schema lock id {5} on the file {0} using the following user: {2}/{3}and password:{4}", fileUrl, clientId, userName, domain, password, schemaLockId)); this.isEnvironmentRollbackSuccess = false; } }; this.AddOrUpdate(new SharedLockKey(fileUrl, clientId, schemaLockId), function); }