Home » Category » DotNet Visual Basic

DotNet Visual Basic: IDeserializationCallback

206| Wed, 02 Jan 2008 18:15:00 GMT| sstory| Comments (0)
In Jeffrey Richters article on Serialization--part 2 from MSDN 2002, he
mentions that "IDeserializationCallback....When this method is called, all
objects have had their fields set. But there's no way to tell what order
multiple objects have their OnDeserialization called. so, while the fields
may be initialized, you still don't know if a referenced object is
completely deserialized if that referenced object also implements the
IDeserializationCallback interface."

I have a form that has a specific collection class as a private member.
The objects in that collection have a member variable that references the
form on which the collection class is.
After deserialization, I need to reset this member variable.

How can I best do it?

If I can't trust IDeserializationCallback, is there a way to call the
deserialization for the collection on the form, and the code not continue
executing until this call is made, and thus after the call comes back, I can
call a method on the collection class to set all items' ParentForm property
in the collection?

Does the vb code execute asynchronously here (i.e. the next thing would
never happen until the deserialization call is finished)? I think this is
the case unless it is a multithreaded app.

Any thoughts?

Thanks,

Shane

Keywords & Tags: ideserializationcallback, dotnet, visual basic, vb, .net

URL: http://dotnet.itags.org/dotnet-visual-basic/182929/
 
«« Prev - Next »» 0 helpful answers below.

DotNet Visual Basic Hot Answers

DotNet Visual Basic New questions

DotNet Visual Basic Related Categories