Some help needed: Serialization Error in CslaLight

Some help needed: Serialization Error in CslaLight

Old forum URL: forums.lhotka.net/forums/t/5994.aspx


Andreas posted on Monday, December 15, 2008

Hi,

I am getting a Serialization exception in cslalight (MoblileFormatter.Serialize(XmlWriter writer, object graph)) when I am adding a managed property of type Dictionary<string, string> to my business object. Here is my declaration:

private static PropertyInfo<System.Collections.Generic.Dictionary<string, string>> ErrorsProperty = RegisterProperty<System.Collections.Generic.Dictionary<string, string>>(new PropertyInfo<System.Collections.Generic.Dictionary<string, string>>("Errors", "Errors", new System.Collections.Generic.Dictionary<string, string>()));
public System.Collections.Generic.Dictionary<string, string> Errors
{
    get
    {
        return GetProperty(ErrorsProperty);
    }
}

Is a kind of Dictionary<string, string>-type allowed for managed backing fields anyway?

 

sergeyb replied on Monday, December 15, 2008

There is another thread dedicated to this.

http://forums.lhotka.net/forums/thread/28961.aspx

 

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: Andreas [mailto:cslanet@lhotka.net]
Sent: Monday, December 15, 2008 9:09 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Some help needed: Serialization Error in CslaLight

 

Hi,

I am getting a Serialization exception in cslalight (MoblileFormatter.Serialize(XmlWriter writer, object graph)) when I am adding a managed property of type Dictionary<string, string> to my business object. Here is my declaration:

private static PropertyInfo<System.Collections.Generic.Dictionary<string, string>> ErrorsProperty = RegisterProperty<System.Collections.Generic.Dictionary<string, string>>(new PropertyInfo<System.Collections.Generic.Dictionary<string, string>>("Errors", "Errors", new System.Collections.Generic.Dictionary<string, string>()));
public System.Collections.Generic.Dictionary<string, string> Errors
{
    get
    {
        return GetProperty(ErrorsProperty);
    }
}

Is a kind of Dictionary<string, string>-type allowed for managed backing fields anyway?

 



Copyright (c) Marimer LLC