CReplicationProject.Name Property
Gets or sets the name of the Commerce Server Staging (CSS) project.
object Name { set; get; }
Return Value
A string that contains the name of the project. Project names must consist of alphanumeric characters and must not exceed 49 characters.
Remarks
Changes to this property do not take effect until the Commit method is called.
The CReplicationProject.Name property corresponds to the COM property named ReplicationProject.Name.
Example
The following example retrieves the names of the existing CSS projects.
CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
Console.WriteLine("The project names are as follows:");
int iterator = 0;
object i = iterator as object;
while (true)
{
try
{
CReplicationProject project = (CReplicationProject)replicationServer.EnumProjects(ref i);
Console.WriteLine(project.get_Name());
}
catch (System.Runtime.InteropServices.COMException e)
{
// Exit if "No more items" error
if (e.ErrorCode == -2147422485)
break;
else
throw e;
}
}
See Also
Other Resources
How to Create and Modify a Staging Project
CReplicationServer.EnumProjects Method
CReplicationProject.Get Method