Skip to content

Instantly share code, notes, and snippets.

@jmarnold
Created July 4, 2011 17:39
Show Gist options
  • Save jmarnold/1063675 to your computer and use it in GitHub Desktop.
Save jmarnold/1063675 to your computer and use it in GitHub Desktop.
MultipleViews
public interface IContentPart { }
public class TitlePart : IContentPart { // whatever else }
public class BodyPart : IContentPart { // whatever else }
public class MyFubuRegistry : FubuRegistry
{
public MyFubuRegistry()
{
// other stuff
Views
.RegisterActionLessViews(token => typeof(IContentPart).IsAssignableFrom(token.ViewModelType));
}
}
public class PageContentType
{
public TitlePart Title { get; set; }
public BodyPart Body { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment