CReplicationClient.SendFiles Method
Sends multiple files to each destination server that is defined for the Commerce Server Staging (CSS) project.
Note
This method and the CReplicationClient object are used only to stage individual files. You cannot use this method to stage projects.
void SendFiles(ref Object fileArray)
Parameters
- fileArray
The array of files to replicate. The file paths should include only the portion relative to the project. They should not include the full path.
Remarks
You must have CSS administrator or operator rights on the project to call this method.
If a connection to a destination server has already been established, this method sends the files. Otherwise, it connects to the destination server, sends the files, and then disconnects, committing the files.
If transaction processing is turned on at the destination servers, the file transaction is not applied until either the Commit method or the Disconnect method is called.
Because this method does not use the CSS service on the source staging server, the replication information is not logged on the source server.
Note
You cannot call the SendFiles method when you are replicating a project on a source staging server. If you try to do both, CSS refuses and issues an error message.
The CReplicationClient.SendFiles method corresponds to the COM method named ReplicationClient.SendFiles.
Example
The following example sends the files Newfile1.htm through Newfile10.htm to the destination servers that are defined for Project1.
const int numFiles = 10;
CReplicationClient replicationClient = new CReplicationClient();
replicationClient.Initialize("Project1");
object[] fileList = new object[numFiles];
for (int i = 0; i < numFiles; i++)
{
fileList[i] = string.Format("Newfile {0}.htm", i);
}
object o = fileList;
replicationClient.SendFiles(ref o);
See Also
Other Resources
CReplicationClient.DeleteFile Method
CReplicationClient.GetExtendedErrorInfo Method
CReplicationClient.SendFile Method