Skip to content

Instantly share code, notes, and snippets.

@renestein
Created January 3, 2011 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renestein/763469 to your computer and use it in GitHub Desktop.
Save renestein/763469 to your computer and use it in GitHub Desktop.
[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