שתף באמצעות


CReplicationRoute.Name Property

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

Gets or sets the name of a Commerce Server Staging (CSS) route.

object Name { set; get; }

Return Value

A string that contains the name of the route. Route names may consist of alphanumeric characters and must not exceed 49 characters.

Remarks

The CReplicationRoute.Name property corresponds to the COM property named ReplicationRoute.Name.

Example

The following example retrieves and displays the names of all existing CSS routes.

CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
CReplicationRoute replicationRoute;
Console.WriteLine("The routes are:");
int i = 0;
object iterator = i as object;
while (true)
  {
  try
    {
    replicationRoute = replicationServer.EnumRoutes(ref iterator) as CReplicationRoute;
    Console.WriteLine(replicationRoute.get_Name());
    }
  catch (System.Runtime.InteropServices.COMException e)
    {
        // Quit if "No more items" or "No routes" error
        if (e.ErrorCode == -2147422485 || e.ErrorCode == -1073680678)
          break;
      else
          throw;
    }
  }

See Also

Other Resources

CReplicationServer.EnumRoutes Method

CReplicationRoute Class