Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Forked from anonymous/gist:4635005
Last active December 11, 2015 17:29
Show Gist options
  • Save jonpryor/4635021 to your computer and use it in GitHub Desktop.
Save jonpryor/4635021 to your computer and use it in GitHub Desktop.
static readonly IList<ViewModel> registeredEntities = new List<ViewModel>();
protected static IList<ViewModel> RegisteredViewModels
{
get
{
return registeredEntities;
}
}
public ViewModel()
{
registeredEntities.Add(this);
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment