Share via


CReplicationRoute.BaseDirectory Property

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

Gets or sets the base directory for a Commerce Server Staging (CSS) route.

object BaseDirectory { set; get; }

Return Value

A string that contains the full path of the base directory.

Remarks

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

Example

The following example specifies D:\Stress as the base directory for the route named Test.

CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
CReplicationRoute replicationRoute;
  int i = 0;
  object iterator = i as object;
  while (true)
  {
    try
    {
     replicationRoute = replicationServer.EnumRoutes(ref iterator) as CReplicationRoute;
      // If the route is Test, add base directory
      if (replicationRoute.get_Name().ToString() == "Test")
      {
        replicationRoute.set_BaseDirectory(@"D:\Stress");
        replicationRoute.Commit();
        break;
      }
    }
    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

CReplicationRoute.Get Method

CReplicationRoute.Put Method

CReplicationRoute Class