It is.....it's just the MSDN example class name. " If you want to avoid having your serialization code split up amongst two classes (Person and PersonSerializationHelper or whatever), you could implement it all in the helper class and delegate to it from within Person.GetObjectData."
ahhh...thats a nice simple idea.....thanks. -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Fabian Schmied Sent: 27 April 2007 12:21 To: [email protected] Subject: Re: [ADVANCED-DOTNET] Serialising almost singletons.... > I've got a solution...it isn't especially pleasant though. > > I pretty much implement the singleton code as published.......but use > > ISerializable.GetObjectData > > To explicitly push the state for the "SingletonSerializationHelper" to > recreate the 'singleton' > > It's unpleasant because I have 1 class having to know the internal > structure of another class.....it's a bug waiting to happen. I don't know what your SingletonSerializationHelper is, but if it is an implementation of IObjectReference, that's exactly the way it is supposed to be. In case it's not, an example of this can be found at http://twoday.tuwien.ac.at/fcs/stories/29226/ . If you want to avoid having your serialization code split up amongst two classes (Person and PersonSerializationHelper or whatever), you could implement it all in the helper class and delegate to it from within Person.GetObjectData. Fabian =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
