Export (0) Print
Expand All

CReplicationServer.EnumRoutes Method

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

Retrieves the replication routes that are defined on the Commerce Server Staging (CSS) server.

object EnumRoutes(ref object iterator)


Used by the CSS service to enumerate the list of routes. This value should be initialized to 0 (zero) and should not be modified.

The CReplicationRoute object for this iteration.

You must have CSS administrator or operator permissions to call this method.

This method sets e.ErrorCode to -1073680678 (“No routes defined.”) when there are no routes defined on the server. It sets e.ErrorCode to -2147422485 (“No more items.”) and returns an empty CReplicationRoute object to indicate the end of the enumeration.

The CReplicationServer.EnumRoutes method corresponds to the COM method named ReplicationServer.EnumRoutes.

The following example displays the names of the routes that are defined on the content deployment server.

CReplicationServer replicationServer = new CReplicationServer();
  Console.WriteLine("The routes are:");
  int iterator = 0;
  object i = iterator as object;
  while (true)
          CReplicationProject project = (CReplicationProject)replicationServer.EnumRoutes(ref i);
      catch (System.Runtime.InteropServices.COMException e)
          // Quit if "No more items" error
          if (e.ErrorCode == -2147422485)
              throw e;
© 2014 Microsoft