Share via


VirtualCatalog Class

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

A type of product catalog whose data is built from other catalogs.

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

Syntax

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

Remarks

Manages virtual catalogs. The virtual catalog object provides access to the details of a virtual catalog, catalog search and product and category management.

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..::.CatalogObject
      Microsoft.CommerceServer.Catalog..::.MultilingualCatalogObject
        Microsoft.CommerceServer.Catalog..::.ProductCatalog
          Microsoft.CommerceServer.Catalog..::.VirtualCatalog

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

VirtualCatalog Members

Microsoft.CommerceServer.Catalog Namespace