Share via


GetDefinitions Method

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

Returns a CatalogDefinitionsDataSet containing all the definitions in the catalog system.

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

Syntax

'Declaration
Public Function GetDefinitions As CatalogDefinitionsDataSet
'Usage
Dim instance As CatalogContext
Dim returnValue As CatalogDefinitionsDataSet

returnValue = instance.GetDefinitions()
public CatalogDefinitionsDataSet GetDefinitions()
public:
CatalogDefinitionsDataSet^ GetDefinitions()
public function GetDefinitions() : CatalogDefinitionsDataSet

Return Value

Type: Microsoft.CommerceServer.Catalog..::.CatalogDefinitionsDataSet
A CatalogDefinitionsDataSet containing all the definitions in the catalog system.

Remarks

The definitions can be Category and/or Product definitions.

Examples

This example describes how to retrieve the definitions in the catalog system and access the properties on the CatalogDefinitionsDataSet object.

using System;
using Microsoft.CommerceServer.Catalog;
private void GetAllDefinitions(CatalogContext catalogContext)
{
  CatalogDefinitionsDataSet catalogDefinitions = catalogContext.GetDefinitions();
  foreach(CatalogDefinitionsDataSet.CatalogDefinition catalogDefinition in catalogDefinitions.CatalogDefinitions)
  {
    string definitionName = catalogDefinition.DefinitionName;
    CatalogDefinitionType catalogDefinitionType = (CatalogDefinitionType)catalogDefinition.DefinitionType;
    string userDefinedDefinitionAttribute = (string)catalogDefinition["UserDefinedDefinitionAttributeName"];
  }
}

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

GetDefinitions Overload

Microsoft.CommerceServer.Catalog Namespace