I have an object to deserialize but the object has custom type ApplicationLanguage that cannot be serialize.
[Serializable]
public class FieldTranslation
{
// how is this possible?
// does the 'en-us' in this member is reachable in this concept?
//public ApplicationLanguage Lang = ApplicationLanguagesList.Get("en-us");
//public ApplicationLanguage Lang { get; set; }
[XmlAttribute("name")]
public string Name{ get; set; }
public string Tooltip { get; set; }
public string Label { get; set; }
public string Error { get; set; }
public string Language { get; set; }
}
I built an API to get type ApplicationLanguage from the cache like that:
ApplicationLanguage en= ApplicationLanguagesList.Get("en-us");
Is there anyway that I can combine the custom type in the serialization above?
this is the xml:
<Fields lang="en-us">
<Item name="FirstName">
<Tooltip>Please provide your {0}</Tooltip>
<Error>{0} Is not valid</Error>
<Label>First Name</Label>
</Item>
</Fields>
you could change your class struct like
and then set the language property to serialize