Re: [Mono-dev] Problem with BinarySerialization

2010-02-03 Thread PFJ
Hi, Robert Jordan wrote: On 02.02.2010 14:35, PFJ wrote: Thus, the only *clean* way to solve this is introducing a shared assembly implementing the classes you want to serialize. It's a common pattern. As the serializer is only used once, can the other app just deserialize and use

Re: [Mono-dev] Problem with BinarySerialization

2010-02-03 Thread Robert Jordan
On 03.02.2010 10:49, PFJ wrote: Hi, Robert Jordan wrote: On 02.02.2010 14:35, PFJ wrote: Thus, the only *clean* way to solve this is introducing a shared assembly implementing the classes you want to serialize. It's a common pattern. As the serializer is only used once, can the other

[Mono-dev] Problem with BinarySerialization

2010-02-02 Thread PFJ
Hi, I've created my BinarySerialized file like this... namespace elements { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Stream

Re: [Mono-dev] Problem with BinarySerialization

2010-02-02 Thread Robert Jordan
On 02.02.2010 13:04, PFJ wrote: However, the problem comes when I try to read it back in into a different program. The read in code looks like this namespace molarity { [Serializable()] public class xmlhandler : Form, ISerializable {

Re: [Mono-dev] Problem with BinarySerialization

2010-02-02 Thread PFJ
Hi, Robert Jordan wrote: The serialization infrastructure heavily relies on type/assembly identity, but what you're doing here is trying to create an object from serialization data generated from a totally different class. You should implement Elements in a separated assembly which you

Re: [Mono-dev] Problem with BinarySerialization

2010-02-02 Thread Robert Jordan
On 02.02.2010 14:01, PFJ wrote: Hi, Robert Jordan wrote: The serialization infrastructure heavily relies on type/assembly identity, but what you're doing here is trying to create an object from serialization data generated from a totally different class. You should implement Elements in

Re: [Mono-dev] Problem with BinarySerialization

2010-02-02 Thread PFJ
Hi, Robert Jordan wrote: What I have done is created a completely different app to generate the serialized data - it's intended to be run once, create the data file and that's it. The file is then sucked in to the 2nd application for deserializing. Would what I want to do be better

Re: [Mono-dev] Problem with BinarySerialization

2010-02-02 Thread Robert Jordan
On 02.02.2010 14:35, PFJ wrote: Thus, the only *clean* way to solve this is introducing a shared assembly implementing the classes you want to serialize. It's a common pattern. As the serializer is only used once, can the other app just deserialize and use it? I've reimplemented the