Created
July 4, 2011 17:39
-
-
Save jmarnold/1063675 to your computer and use it in GitHub Desktop.
MultipleViews
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IContentPart { } | |
public class TitlePart : IContentPart { // whatever else } | |
public class BodyPart : IContentPart { // whatever else } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFubuRegistry : FubuRegistry | |
{ | |
public MyFubuRegistry() | |
{ | |
// other stuff | |
Views | |
.RegisterActionLessViews(token => typeof(IContentPart).IsAssignableFrom(token.ViewModelType)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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