DevForce Help Reference
RestoreCacheState(Stream,RestoreStrategy,Boolean,Boolean) Method


Stream to be read
The restore strategy to use
Whether to close the stream when done
True to restore a stream in binary format; false if using text format.
Restores entities from a stream into this EntityManager using the RestoreStrategy specified.
Syntax
'Declaration
 
Public Overloads Sub RestoreCacheState( _
   ByVal stream As Stream, _
   ByVal strategy As RestoreStrategy, _
   Optional ByVal closeOnExit As Boolean, _
   Optional ByVal useBinaryFormat As Boolean _
) 
'Usage
 
Dim instance As CacheStateManager
Dim stream As Stream
Dim strategy As RestoreStrategy
Dim closeOnExit As Boolean
Dim useBinaryFormat As Boolean
 
instance.RestoreCacheState(stream, strategy, closeOnExit, useBinaryFormat)

Parameters

stream
Stream to be read
strategy
The restore strategy to use
closeOnExit
Whether to close the stream when done
useBinaryFormat
True to restore a stream in binary format; false if using text format.
Remarks
This loads an EntityCacheState from the stream and then performs an Merge into this EntityManager.

Use a System.Security.Cryptography.CryptoStream to read an encrypted input file.

In Silverlight and other applications running with reduced privileges, you can use an System.IO.IsolatedStorageFileStream with this method.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CacheStateManager Class
CacheStateManager Members
Overload List
EntityCacheState Class
SaveCacheState(Stream,Boolean,Boolean) Method

Send Feedback