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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.