다음을 통해 공유


CReplicationServer.Enum Method

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

Retrieves the global properties that are assigned to the Commerce Server Staging (CSS) service on the server.

object Enum(ref object iterator, out object propName)

Parameters

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

  • propName
    Used by the CSS service to enumerate the property names. This value should be initialized to an empty string ("") and should not be modified.

Return Value

The value of the property that is returned in the current iteration. The name of the current property is returned in the propName parameter.

Remarks

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

This method sets the value of e.ErrorCode to -2147422485 (“No more items.”) to indicate the end of the enumeration.

For a list of properties that can be retrieved from the CSS service, see CSS API Global Parameters.

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

Example

The following example displays the names and values of the CSS service properties.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");
  int i = 0;
  object iterator = i as object;
  while (true)
  {
    try
    {
      object param;
      object value = replicationServer.Enum(ref iterator, out param);
         Console.WriteLine("Parameter {0} = {1}", param, value);
    }
      catch (System.Runtime.InteropServices.COMException e)
      {
          // Quit if "No more items" error
          if (e.ErrorCode == -2147422485)
               break;
          else
               throw e;
      }
  }

See Also

Other Resources

Managing the CSS Service

How to Set, Modify, and Retrieve Global Properties for a CSS Service

How to Retrieve Staging Information

CReplicationServer Class