Share via


RebuildProgress Class

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

Contains information about the status of the rebuild operation.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public NotInheritable Class RebuildProgress _
    Inherits OperationsProgress
'Usage
Dim instance As RebuildProgress
public sealed class RebuildProgress : OperationsProgress
public ref class RebuildProgress sealed : public OperationsProgress
public final class RebuildProgress extends OperationsProgress

Remarks

Provides information about the rebuilding a catalog.

Examples

// Rebuilds a virtual catalog
internal void RebuildCatalog(string catalogName)
{
  VirtualCatalog virtualCatalog = (VirtualCatalog)this.catalogContext.GetCatalog(catalogName);
  RebuildProgress rebuildProgress = virtualCatalog.Rebuild();
  while (rebuildProgress.Status == CatalogOperationsStatus.InProgress)
  {
    System.Threading.Thread.Sleep(3000);
    // Call the refresh method to refresh the current status
    rebuildProgress.Refresh();
  }
  Console.WriteLine(rebuildProgress.EndDate);
  // If the rebuild operation failed
  if (rebuildProgress.Status == CatalogOperationsStatus.Failed)
  {
    // Use the Errors property to get the errors that occurred during rebuild
    foreach (CatalogError error in rebuildProgress.Errors)
    {
      Console.WriteLine(error.Message);
    }
  }
}

Inheritance Hierarchy

System..::.Object
  Microsoft.CommerceServer.Catalog..::.CatalogObjectBase
    Microsoft.CommerceServer.Catalog..::.OperationsProgress
      Microsoft.CommerceServer.Catalog..::.RebuildProgress

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

RebuildProgress Members

Microsoft.CommerceServer.Catalog Namespace