Jaa


ApplyCategoryFilter Method

Filters a DiscountItemCollection for a specific category.

Namespace:  Microsoft.CommerceServer.Runtime.Marketing
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Function ApplyCategoryFilter ( _
    filter As DiscountCriteriaFilter, _
    catalogName As String, _
    categoryId As String _
) As DiscountItemCollection
'Usage
Dim instance As DiscountItemCollection
Dim filter As DiscountCriteriaFilter
Dim catalogName As String
Dim categoryId As String
Dim returnValue As DiscountItemCollection

returnValue = instance.ApplyCategoryFilter(filter, _
    catalogName, categoryId)
public DiscountItemCollection ApplyCategoryFilter(
    DiscountCriteriaFilter filter,
    string catalogName,
    string categoryId
)
public:
DiscountItemCollection^ ApplyCategoryFilter(
    DiscountCriteriaFilter^ filter, 
    String^ catalogName, 
    String^ categoryId
)
public function ApplyCategoryFilter(
    filter : DiscountCriteriaFilter, 
    catalogName : String, 
    categoryId : String
) : DiscountItemCollection

Parameters

  • catalogName
    Type: System..::.String
    The name of the catalog to which the category belongs. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
  • categoryId
    Type: System..::.String
    The name of the category to filter on. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).

Return Value

Type: Microsoft.CommerceServer.Runtime.Marketing..::.DiscountItemCollection
A new filtered DiscountItemCollection.

Exceptions

Exception Condition
ArgumentNullException

Any of the input parameters are nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Creates and returns a DiscountItemCollection, the original DiscountItemCollection filtered by a category. The newly created DiscountItemCollection contains only DiscountItem object with the specified categoryId.

A category is uniquely identified by its name and the name of the catalog to which it belongs. Additional filter settings can be specified by setting the corresponding properties on the DiscountCriteriaFilter input parameter. The existing DiscountItemCollection is not modified by this method.

Permissions

See Also

Reference

DiscountItemCollection Class

DiscountItemCollection Members

Microsoft.CommerceServer.Runtime.Marketing Namespace