CSharpTest.Net
Deserialize(T,INameValueStore) Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Reflection Namespace > PropertySerializer<T> Class > Deserialize Method : Deserialize(T,INameValueStore) Method

instance
rawstorage

Glossary Item Box

Reads all properties from the specified proeprty serialization

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Deserialize( _
   ByVal instance As T, _
   ByVal rawstorage As INameValueStore _
) 
C# 
public void Deserialize( 
   T instance,
   INameValueStore rawstorage
)

Parameters

instance
rawstorage

Example

Library/Library.Test/TestPropertySerializer.cs

C#Copy Code
HaveReadOnly o = new HaveReadOnly();
o.Value = "a";

PropertySerializer<HaveReadOnly> ser = new PropertySerializer<HaveReadOnly>("Value", "ReadOnly");
ser.ContinueOnError = true;
Assert.AreEqual(true, ser.ContinueOnError);

ser.Serialize(o, Dictionary);

HaveReadOnly test = new HaveReadOnly();
ser.Deserialize(test, Dictionary);
VB.NETCopy Code
Dim o As New HaveReadOnly()
o.Value = "a"

Dim ser As New PropertySerializer(Of HaveReadOnly)("Value", "ReadOnly")
ser.ContinueOnError = True
Assert.AreEqual(True, ser.ContinueOnError)

ser.Serialize(o, Dictionary)

Dim test As New HaveReadOnly()
ser.Deserialize(test, Dictionary)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys