SPChangeTokenCollection.Add Method (SPChangeToken, Boolean)
Adds a change token to the collection and optionally overwrites any existing change token in the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub Add ( _
changeToken As SPChangeToken, _
bOverWrite As Boolean _
)
'Usage
Dim instance As SPChangeTokenCollection
Dim changeToken As SPChangeToken
Dim bOverWrite As Boolean
instance.Add(changeToken, bOverWrite)
public void Add(
SPChangeToken changeToken,
bool bOverWrite
)
Parameters
changeToken
Type: Microsoft.SharePoint.SPChangeTokenThe change token to create.
bOverWrite
Type: System.Booleantrue to overwrite any existing change token in the collection; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentException | A change token with the same ScopeId already exists in the collection and bOverWrite is false. |
Remarks
A change token collection cannot contain more than one change token for a given content database. Use this method to update the change token that is already in the collection.