Visual Basic (Declaration) | |
---|---|
Public Overloads Sub RestoreCacheState( _ ByVal stream As Stream, _ ByVal strategy As RestoreStrategy, _ Optional ByVal closeOnExit As Boolean, _ Optional ByVal useBinaryFormat As Boolean _ ) |
Visual Basic (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) |
C# | |
---|---|
public void RestoreCacheState( Stream stream, RestoreStrategy strategy, bool closeOnExit, bool useBinaryFormat ) |
C++/CLI | |
---|---|
public: void RestoreCacheState( Stream^ stream, RestoreStrategy^ strategy, bool closeOnExit, bool 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.
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.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family