Share via


ContentList.SetScore Method (PIA)

Use this method to set a new score for an item in a ContentList object.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Caching
…
Public Sub SetScore(RowNum As Integer,
 Score As Single,
 Optional Component As String,
 Optional Description As String)

[C#]

using Microsoft.CommerceServer.Interop.Caching;
…
public void SetScore(intRowNum,
 floatScore,
 stringComponent,
 stringDescription);

Parameters

[Visual Basic .NET]

  • RowNum
    An Integer that contains the position of the item in the ContentList object for which a new score will be set. Positions are counted from zero (0), not from one (1).
  • Score
    A Single that contains the new score.
  • Component
    A String that is intended to contain the name of the pipeline component that is setting the new score. This parameter is optional and is used for score tracing.
  • Description
    A String that is intended to contain the reason that the score is being set; for example, Need of Delivery. This parameter is optional and is used for score tracing.

[C#]

  • RowNum
    A int that contains the position of the item in the ContentList object for which a new score will be set. Positions are counted from zero (0), not from one (1).
  • Score
    A float that contains the new score.
  • Component
    A string that is intended to contain the name of the pipeline component that is setting the new score. This parameter is optional and is used for score tracing. To omit this parameter, set to Type.Missing.
  • Description
    A string that is intended to contain the reason that the score is being set; for example, Need of Delivery. This parameter is optional and is used for score tracing. To omit this parameter, set to Type.Missing.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

Values for the Component and Description parameters are optional, but at least one parameter must be passed.

This method assumes that the ContentList object has a column of type CLCOL_R4 with the CLCOL_SCORE_COLUMN flag set.

For the sake of uniformity, pipeline components provided with Commerce Server 2002 pass the ProgID of the component for the Component parameter.

[Visual Basic .NET]

Example

'strProgID is a string
myContentList.SetScore(123456, 0.5, strProgID, "")

Requirements

Namespace: Microsoft.CommerceServer.Interop.Caching

Platforms: Windows 2000, Windows Server 2003

Assembly: cachecomplib (in cachecomplib.dll)

See Also

ContentList Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.