Condividi tramite


GetPropertiesInCatalog Method

Returns a CatalogPropertiesDataSet containing information about all the properties in the specified catalog.

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

Syntax

'Declaration
Public Function GetPropertiesInCatalog ( _
    catalogName As String _
) As CatalogPropertiesDataSet
'Usage
Dim instance As CatalogContext
Dim catalogName As String
Dim returnValue As CatalogPropertiesDataSet

returnValue = instance.GetPropertiesInCatalog(catalogName)
public CatalogPropertiesDataSet GetPropertiesInCatalog(
    string catalogName
)
public:
CatalogPropertiesDataSet^ GetPropertiesInCatalog(
    String^ catalogName
)
public function GetPropertiesInCatalog(
    catalogName : String
) : CatalogPropertiesDataSet

Parameters

  • catalogName
    Type: System..::.String
    The name of the catalog to retrieve properties for. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).

Return Value

Type: Microsoft.CommerceServer.Catalog..::.CatalogPropertiesDataSet
A CatalogPropertiesDataSet containing information about all the properties in the specified catalogName.

Remarks

The CatalogPropertiesDataSet contains all the attributes for all the properties in the specified catalog. If the catalog does not exist this method will not throw an exception but will return a CatalogPropertiesDataSet with one DataTable containing no rows.

Examples

This example shows how to get all the properties in the catalog and access their attributes.

private void GetPropertiesInCatalog(CatalogContext catalogContext)
{
  CatalogPropertiesDataSet catalogProperties = catalogContext.GetPropertiesInCatalog("Catalogname");
  foreach(CatalogPropertiesDataSet.CatalogProperty catalogProperty in catalogProperties.CatalogProperties)
  {
    string propertyName = catalogProperty.PropertyName;
    string displayName = catalogProperty.DisplayName;
  }
}

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

Microsoft.CommerceServer.Catalog Namespace