Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[KnownType("GetKnownTypes")]
public class KnownTypesDictionary : Dictionary<string, object>
{
private static Type[] KNOWN_TYPES =
{
typeof(OrderVO),
typeof(PostVO),
typeof(SiteVO),
typeof(CommentVO),
typeof(ViewObjectBase),
typeof(ObservableCollection<OrderVO>),
typeof(ObservableCollection<SiteVO>),
typeof(ObservableCollection<CommentVO>),
typeof(ObservableCollection<PostVO>),
typeof(KnownTypesDictionary)
};
public KnownTypesDictionary()
: base()
{
}
public KnownTypesDictionary(IDictionary<String, Object> originalDictionary) : base(originalDictionary)
{
}
public static IEnumerable<Type> GetKnownTypes()
{
return KNOWN_TYPES;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.