Skip to content

Instantly share code, notes, and snippets.

@omares
Created June 14, 2015 00:40
Show Gist options
  • Save omares/47da0b771a09c41cf7ae to your computer and use it in GitHub Desktop.
Save omares/47da0b771a09c41cf7ae to your computer and use it in GitHub Desktop.
private TypeInfo getPageTypeForViewModel(INavigatableViewModel viewModel)
{
// hier will er ein cast auf TypeInfo
return from type in assembly.DefinedTypes
where type.GetCustomAttribute<ViewForAttribute>()?.ViewModelType == viewModel.GetType()
select type;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment