Delen via


CReplicationProject.GetProjectStatus Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets the global status of a Commerce Server Staging (CSS) replication project. For example, a replication project will have a global status of "Completed" only if the replication has completed on all the servers that are involved in the project.

void GetProjectStatus(out string status)

Return Value

A string that contains the value of the replication state for the CSS project. The following table shows the possible status values.

Status

Description

"InProgress"

The replication of the project is in progress.

"Unknown"

The replication status of the project is unknown.

"Failed"

The replication project failed.

"Cancelled"

The replication project was cancelled.

"Idle"

The project is idle. No replication is occurring.

"Completed"

The replication of the project completed.

Remarks

To start the replication of a CSS project, see the Start and StartReplicationClient methods.

The CReplicationProject.GetProjectStatus method corresponds to the COM method named ReplicationProject.GetProjectStatus.

Example

The following example retrieves the status of the project named Project1.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");

  CReplicationProject replicationProject;
  replicationProject = (CReplicationProject)replicationServer.OpenProject("Project1", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);

  string status;
  replicationProject.GetProjectStatus(out status);
  Console.WriteLine("Last replication status for Project1: {0}", status);

See Also

Other Resources

Projects

How to Retrieve Project Information

CReplicationProject.Start Method

CReplicationProject.StartReplicationClient Method

CReplicationProject.Put Method

CReplicationProject Class