Skip to content

Instantly share code, notes, and snippets.

Created January 25, 2013 14:54
Show Gist options
  • Save anonymous/4635005 to your computer and use it in GitHub Desktop.
Save anonymous/4635005 to your computer and use it in GitHub Desktop.
simple stupid code :/
static IList<ViewModel> registeredEntities;
protected static IList<ViewModel> RegisteredViewModels
{
get
{
return registeredEntities;
}
set
{
registeredEntities = value;
}
}
public ViewModel()
{
if (RegisteredViewModels == null)
RegisteredViewModels = new List<ViewModel>();
registeredEntities.Add(this);
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment