I'm a huge fan of the CSLA framework but unfortunately am working on an existing system that doesn't use anything close to this. I have however tried implementing some of the technologies that Rockford as presented.
I'm having an issue where I'm trying to serialize a Business Object that has a property that is a file (could be any kind of file {.txt, .doc, .pdf, etc}). I load the file as a Byte array and the property itself is of type byte(). The only other property of this file is the file name. So I've got two properties, one of a String type and the other byte().
My problem is that the object won't serialize, or I should say it will serialize, but when I use the Binaryformatter.Deserialize it returns nothing?
Any thoughts, comments, suggestions will be most welcome.
Thanks for taking the time to read this.
Not sure if you can serialize the file like that. What are you trying to do with the bytes at the other end? I'm guessing it doesn't know how to deserialize it back to a file.
The file is kept as a byte array simply because this enables me to include a file in my object regardless of the type of file. I can then send it with the object anywhere I want and then restore it to a hard disk anywhere and simply name the new file with the correct extension and any name I want.
Copyright (c) Marimer LLC