SPWorkflowCollection constructor (SPListItem, SPWorkflowState, SPWorkflowState, Int32, Boolean)
Initializes a new instance of the SPWorkflowCollection class that matches the criteria from the inclusiveFilterStates parameter and the exclusiveFilterStates parameter for all of the workflows on the SPListItem object.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub New ( _
item As SPListItem, _
inclusiveFilterStates As SPWorkflowState, _
exclusiveFilterStates As SPWorkflowState, _
rowCountLimit As Integer, _
ascending As Boolean _
)
'Usage
Dim item As SPListItem
Dim inclusiveFilterStates As SPWorkflowState
Dim exclusiveFilterStates As SPWorkflowState
Dim rowCountLimit As Integer
Dim ascending As Boolean
Dim instance As New SPWorkflowCollection(item, inclusiveFilterStates, _
exclusiveFilterStates, rowCountLimit, _
ascending)
public SPWorkflowCollection(
SPListItem item,
SPWorkflowState inclusiveFilterStates,
SPWorkflowState exclusiveFilterStates,
int rowCountLimit,
bool ascending
)
Parameters
item
Type: Microsoft.SharePoint.SPListItemAn SPListItem object.
inclusiveFilterStates
Type: Microsoft.SharePoint.Workflow.SPWorkflowStateAn SPWorkflowState object. All workflows in this collection must have one of these states.
exclusiveFilterStates
Type: Microsoft.SharePoint.Workflow.SPWorkflowStateAn SPWorkflowState object. All workflows in this collection must not have any of these states.
rowCountLimit
Type: System.Int32The maximum size of items allowed in this collection.
ascending
Type: System.Booleantrue to set the order of the items in this collection to ascending based on the Created property; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The item parameter is null . |