Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CReplicationRoute.Get Method

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

Gets the value of a property for a Commerce Server Staging (CSS) route.


Routes can be used only to stage Web content and business data.

object Get(string propName)

The name of the property to get. The only property available is BaseDirectory. This identifies the directory from which the content is replicated.

The value of the requested property. For the BaseDirectory property, which is the only property currently available, the return value is a string that contains the directory from which the content is replicated.

The CReplicationRoute.Get method corresponds to the COM method named ReplicationRoute.Get.

The following example retrieves and displays the value of the BaseDirectory property for all routes.

CReplicationServer replicationServer = new CReplicationServer();
CReplicationRoute replicationRoute;
int i = 0;
object iterator = i as object;
while (true)
    replicationRoute = replicationServer.EnumRoutes(ref iterator) as CReplicationRoute;
    Console.WriteLine("The base directory for route {0} is {1}", replicationRoute.get_Name(), replicationRoute.get_BaseDirectory());
    catch (System.Runtime.InteropServices.COMException e)
       // Quit if "No more items" or "No routes" error
       if (e.ErrorCode == -2147422485 || e.ErrorCode == -1073680678)
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.