Click here to Skip to main content
16,005,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: crypto stream problems Pin
Ennis Ray Lynch, Jr.19-Mar-08 3:45
Ennis Ray Lynch, Jr.19-Mar-08 3:45 
GeneralRe: crypto stream problems Pin
Russell Jones19-Mar-08 4:19
Russell Jones19-Mar-08 4:19 
GeneralRe: crypto stream problems Pin
Russell Jones19-Mar-08 5:51
Russell Jones19-Mar-08 5:51 
GeneralThreading concepts.. Pin
ptr2void19-Mar-08 0:45
ptr2void19-Mar-08 0:45 
GeneralRe: Threading concepts.. Pin
Laddie19-Mar-08 0:51
Laddie19-Mar-08 0:51 
GeneralRe: Threading concepts.. Pin
ptr2void19-Mar-08 1:10
ptr2void19-Mar-08 1:10 
GeneralRe: Threading concepts.. Pin
Bekjong19-Mar-08 1:23
Bekjong19-Mar-08 1:23 
GeneralBinary Object Serialization Hiccup! Pin
Jammer19-Mar-08 0:39
Jammer19-Mar-08 0:39 
Hi All,

Over the last couple of days I’ve been implementing my first ever instance of binary object to disk, disk to object serialization.

I have tested this serialization code and its all working as expected. If I hard code an initiated serialization process inside the same class that builds the object the save happens without error. However, once that object has been build and passed back to the interface and bound to a grid trying to start a serialization process then generates this error:

Message="Type 'System.Collections.Specialized.CollectionChangedEventManager' in Assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable." Source="mscorlib"

I think I know what the problem is but just wanted to get some more insightful input. When I pass this ‘loaded’ object to my serialization process (even though its based on my class FileInformation which is marked [Serializable()] and also implements ISerializable (GetObjectData…ect…) its not being passed to the serialize class as a serializable object. At the moment when I load a file I do it like:

ObservableCollection<FileInformation> loadeddata = loaddata.LoadDatabseData(fileToLoad);


loaddata is a new instance of my serialization class instantiated like:
DatabaseStorage loaddata = new DataBaseStorage();
When I ‘pass’ this object to the serialization process I do it like:

public ObservableCollection<fileinformation> DataToSave
{
	Get {return DataGrid.DataSource;}
}


(DataSource can be used on the xamDataGrid from Infragistics to either get or set the datasource)

After doing some more reading about serialization last night I found out that binary serialization also stores instance information, could this be part of the problem?

I've also read about this problem being related to events and delegates in the class marked as [Serializable()] not having been marked as [NotSerializable] however, my class FileInformation does not contain any delegates or events ... it does have a property that creates a lookup but that is not included in my GetObjectData() method ...

Thanks for any input ...

Jammer

Going where everyone here has gone before! Smile | :)
My Blog

GeneralRe: Binary Object Serialization Hiccup! Pin
Ennis Ray Lynch, Jr.19-Mar-08 3:48
Ennis Ray Lynch, Jr.19-Mar-08 3:48 
GeneralRe: Binary Object Serialization Hiccup! Pin
Jammer19-Mar-08 4:02
Jammer19-Mar-08 4:02 
GeneralRe: Binary Object Serialization Hiccup! Pin
Jammer19-Mar-08 9:43
Jammer19-Mar-08 9:43 
Generalgeneric collection Pin
arkiboys19-Mar-08 0:06
arkiboys19-Mar-08 0:06 
GeneralC#.Net Pin
Aditya Baraya19-Mar-08 0:00
Aditya Baraya19-Mar-08 0:00 
GeneralRe: C#.Net Pin
Christian Graus19-Mar-08 0:07
protectorChristian Graus19-Mar-08 0:07 
GeneralRe: C#.Net Pin
Aditya Baraya19-Mar-08 0:47
Aditya Baraya19-Mar-08 0:47 
GeneralRe: C#.Net Pin
Christian Graus19-Mar-08 0:55
protectorChristian Graus19-Mar-08 0:55 
GeneralFind Functioality Pin
Aditya Baraya19-Mar-08 1:26
Aditya Baraya19-Mar-08 1:26 
GeneralRe: Find Functioality Pin
Christian Graus19-Mar-08 10:22
protectorChristian Graus19-Mar-08 10:22 
GeneralRe: Find Functioality Pin
Aditya Baraya19-Mar-08 17:46
Aditya Baraya19-Mar-08 17:46 
GeneralRe: C#.Net Pin
Colin Angus Mackay19-Mar-08 2:38
Colin Angus Mackay19-Mar-08 2:38 
GeneralRe: C#.Net Pin
Not Active19-Mar-08 3:48
mentorNot Active19-Mar-08 3:48 
GeneralRe: C#.Net Pin
Colin Angus Mackay23-Mar-08 0:17
Colin Angus Mackay23-Mar-08 0:17 
QuestionConfiguration Files Location Problem Pin
matthias s.18-Mar-08 23:59
matthias s.18-Mar-08 23:59 
GeneralGlobal error handler Pin
N a v a n e e t h18-Mar-08 23:53
N a v a n e e t h18-Mar-08 23:53 
GeneralRe: Global error handler Pin
Giorgi Dalakishvili19-Mar-08 0:00
mentorGiorgi Dalakishvili19-Mar-08 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.