Share via


ConvertToStaticCatalogSet Method

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

Convert this catalog set to a static catalog set.

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

Syntax

'Declaration
Public Function ConvertToStaticCatalogSet As StaticCatalogSet
'Usage
Dim instance As DynamicCatalogSet
Dim returnValue As StaticCatalogSet

returnValue = instance.ConvertToStaticCatalogSet()
public StaticCatalogSet ConvertToStaticCatalogSet()
public:
StaticCatalogSet^ ConvertToStaticCatalogSet()
public function ConvertToStaticCatalogSet() : StaticCatalogSet

Return Value

Type: Microsoft.CommerceServer.CatalogSets..::.StaticCatalogSet
The converted DynamicCatalotSet as a StaticCatalogSet.

Remarks

Before the conversion occurs, the CatalogSet is validated:

  • To ensure the specified catalog name is not null, has an appropriate length, and does not contain any special characters.

  • Validate the catalog description if it is specified.

  • To ensure the expression is neither empty nor exceeds the maximum specified length.

Examples

// Converts a dynamic catalog set to a static catalog set
internal void ConvertDynamicToStatic(string catalogSetName)
{
  // Get the catalog set
  DynamicCatalogSet catalogSet = (DynamicCatalogSet)this.catalogSetsContext.GetCatalogSet(catalogSetName);
  // Convert the dynamic catalog set to a static catalog set
  StaticCatalogSet staticcatalogSet = catalogSet.ConvertToStaticCatalogSet();
}

Permissions

See Also

Reference

DynamicCatalogSet Class

DynamicCatalogSet Members

Microsoft.CommerceServer.CatalogSets Namespace