Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Enables continued reading and writing to an EntityList<TEntity> even after it has been renamed.
Namespace: Microsoft.SharePoint.Linq
Assembly: Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)
Syntax
'Declaration
Public Sub RegisterList(Of T) ( _
newListName As String, _
oldListName As String _
)
'Usage
Dim instance As DataContext
Dim newListName As String
Dim oldListName As String
instance.RegisterList(newListName, oldListName)
public void RegisterList<T>(
string newListName,
string oldListName
)
Type Parameters
- T
The type of the list items.
Parameters
newListName
Type: System.StringThe new name of the list.
oldListName
Type: System.StringThe old name of the list.
Remarks
If your code renames a list, you can avoid having to dispose and recreate the EntityList<TEntity> by calling this method. Your code can then continue to access the cached list using the new name.
Important
The T parameter is used in conjunction with the oldListName parameter to identify the EntityList<TEntity> that is being re-registered. For that reason T must be given the same value as the generic parameter of the EntityList<TEntity> object. RegisterList() cannot be used to change the content type of the list items.