示例#1
0
        //public static IQFrameworkContainer ConnectionStrategy<TSource, TTarget>(this IQFrameworkContainer container, Color connectionColor,
        //    Func<TSource, TTarget, bool> isConnected, Action<TSource, TTarget> apply, Action<TSource, TTarget> remove) where TSource : class, IConnectable where TTarget : class, IConnectable
        //{
        //    container.RegisterInstance<IConnectionStrategy>(new CustomConnectionStrategy<TSource, TTarget>(connectionColor,isConnected,apply,remove), typeof(TSource).Name + "_" + typeof(TTarget).Name + "CustomConnection");
        //    return container;
        //}


        public static IQFrameworkContainer RegisterGraphItem <TModel, TViewModel>(this IQFrameworkContainer container)
        {
            container.RegisterRelation <TModel, ViewModel, TViewModel>();
            return(container);
        }
示例#2
0
 public static IQFrameworkContainer RegisterDataChildViewModel <TModel, TViewModel>(
     this IQFrameworkContainer container)
 {
     container.RegisterRelation <TModel, ItemViewModel, TViewModel>();
     return(container);
 }
示例#3
0
 public static void RegisterFilterItem <TFilterData, TAllowedItem>(this IQFrameworkContainer container)
 {
     container.RegisterRelation <TFilterData, IDiagramNodeItem, TAllowedItem>();
 }
示例#4
0
 public static IQFrameworkContainer RegisterCodeTemplate <TFor, TTemplateType>(
     this IQFrameworkContainer container)
 {
     container.RegisterRelation <TFor, CodeGenerator, TTemplateType>();
     return(container);
 }
示例#5
0
 public static IQFrameworkContainer RegisterChildGraphItem <TModel, TViewModel, TDrawer>(this IQFrameworkContainer container)
 {
     container.RegisterRelation <TModel, ItemViewModel, TViewModel>();
     container.RegisterItemDrawer <TViewModel, TDrawer>();
     return(container);
 }
示例#6
0
 public static void RegisterDrawer <TViewModel, TDrawer>(this IQFrameworkContainer container)
 {
     container.RegisterRelation <TViewModel, IDrawer, TDrawer>();
 }