Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function Restore( _ ByVal fileName As String, _ Optional ByVal useBinaryFormat As Boolean _ ) As EntityCacheState |
Visual Basic (Usage) | ![]() |
---|---|
Dim fileName As String Dim useBinaryFormat As Boolean Dim value As EntityCacheState value = EntityCacheState.Restore(fileName, useBinaryFormat) |
C# | |
---|---|
public static EntityCacheState Restore( string fileName, bool useBinaryFormat ) |
C++/CLI | |
---|---|
public: static EntityCacheState^ Restore( String^ fileName, bool useBinaryFormat ) |
Parameters
- fileName
- File containing a serialized EntityCacheState
- useBinaryFormat
- True to restore a file in binary format, false if the file is in text format.
Return Value
An EntityCacheStateUse Restore to deserialize an EntityCacheState which was previously saved to a file.
Note that this method does not merge the EntityCacheState into an EntityManager. Call Merge or CacheStateManager.RestoreCacheState(EntityCacheState) for this. Instead of performing the Restore and merge/restore as separate steps, you can instead use CacheStateManager.RestoreCacheState(string) to accomplish the same thing.
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