Jaa


CReplicationProject.Enum Method

Retrieves the properties that are assigned to a Commerce Server Staging (CSS) project.

object Enum(ref object iterator, ref 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 rights to call this method.

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

For a list of properties that can be retrieved for CSS projects, see Commit and CSS API Flags.

The CReplicationProject.Enum method corresponds to the COM method named ReplicationProject.Enum.

Example

The following example lists the properties of a project named Project1.

CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");

CReplicationProject replicationProject;
replicationProject = (CReplicationProject)replicationServer.OpenProject("Project1", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);

int i = 0;
object iterator = i as object;
while (true)
  {
  try
    {
       object param = new object();
       object value = replicationProject.Enum(ref iterator, ref 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

Projects

How to Create and Modify a Staging Project

How to Retrieve Project Information

CReplicationProject.Commit Method

CSS API Flags

CReplicationProject Class