コード例 #1
0
 public static IQFrameworkContainer AddTypeItem <TNodeData, TViewModel, TDrawer>(this IQFrameworkContainer container) where TNodeData : ITypedItem
 {
     container.AddItem <TNodeData>();
     container.RegisterChildGraphItem <TNodeData,
                                       TViewModel,
                                       TDrawer>();
     return(container);
 }
コード例 #2
0
        public static NodeConfig <TNodeData> AddNode <TNodeData, TNodeViewModel, TNodeDrawer>(this IQFrameworkContainer container, string name) where TNodeData : GenericNode, IConnectable
        {
            container.AddItem <TNodeData>();
            container.RegisterGraphItem <TNodeData, TNodeViewModel, TNodeDrawer>();
            var config = container.GetNodeConfig <TNodeData>();

            config.Name = name;
            return(config);
        }