SPChangeTokenCollection Constructor
Initializes a new instance of the SPChangeTokenCollection class.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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("https://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("https://localhost"));
SPContentDatabaseCollection dbs = wa.ContentDatabases;
foreach (SPContentDatabase db in dbs)
tokens.Add(db.CurrentChangeToken);
See Also
Reference
SPChangeTokenCollection Members
SPChangeTokenCollection Overload