SPChangeTokenCollection constructor

Initializes a new instance of the SPChangeTokenCollection class.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New SPChangeTokenCollection()
public SPChangeTokenCollection()

Examples

The following code example creates a change token collection and then adds the current change token from each database in the current Web application.

Dim tokens As SPChangeTokenCollection =  New SPChangeTokenCollection() 
 
Dim wa As SPWebApplication =  SPWebApplication.Lookup(New Uri("http://localhost")) 
Dim dbs As SPContentDatabaseCollection =  wa.ContentDatabases 
Dim db As SPContentDatabase
For Each db In dbs
    tokens.Add(db.CurrentChangeToken)
Next db
SPChangeTokenCollection tokens = new SPChangeTokenCollection();

SPWebApplication wa = SPWebApplication.Lookup(new Uri("http://localhost"));
SPContentDatabaseCollection dbs = wa.ContentDatabases;
foreach (SPContentDatabase db in dbs)
    tokens.Add(db.CurrentChangeToken);

See also

Reference

SPChangeTokenCollection class

SPChangeTokenCollection members

SPChangeTokenCollection overload

Microsoft.SharePoint namespace

CurrentChangeToken