예제 #1
0
        public SourcesViewModel(ISourceManager sourceManager) : base("sources")
        {
            DisplayName = "Sources";

            Metadata = MappingCollection.Create(sourceManager.Metadata, source => new MetadataSourceViewModel(source));
            Content  = MappingCollection.Create(sourceManager.Content, source => new ContentSourceViewModel(source));
        }
        public ConfigurationViewModel(ShortcutManager shortcutManager) : base("configuration")
        {
            DisplayName = "Configuration";

            Shortcuts = MappingCollection.Create <Shortcut, ShortcutEditorViewModel, ShortcutManager>(shortcutManager, source => new ShortcutEditorViewModel(source));
        }
 protected override MappingCollection Setup()
 {
     return(MappingCollection.Create()
            .List <Customer, Order>("Orders", (parent, childs) => parent.Orders = childs, (parent, child) => parent.CustomerID == child.CustomerID));
 }