IdeaBlade DevForce 2010 Help Reference
RestoreCacheState(Stream,RestoreStrategy,Boolean,Boolean) Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > CacheStateManager Class > RestoreCacheState Method : RestoreCacheState(Stream,RestoreStrategy,Boolean,Boolean) Method



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.
Restores entities from a stream into this EntityManager using the RestoreStrategy specified.

Syntax

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)Copy Code
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.

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 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

See Also

© 2013 All Rights Reserved.