Пример #1
0
        public static IQFrameworkContainer Connectable <TSource, TTarget>(this IQFrameworkContainer container,
                                                                          Color color, bool oneToMany = true)
            where TSource : class, IConnectable
            where TTarget : class, IConnectable
        {
            container.RegisterConnectable <TSource, TTarget>(); //if (oneToMany)

            return(container);
        }
Пример #2
0
 public static IQFrameworkContainer Connectable <TSource, TTarget>(this IQFrameworkContainer container, Color color, bool oneToMany = true)
     where TSource : class, IConnectable
     where TTarget : class, IConnectable
 {
     container.RegisterConnectable <TSource, TTarget>();  //if (oneToMany)
     //container.RegisterInstance<IConnectionStrategy>(new CustomInputOutputStrategy<TSource, TTarget>(color), typeof(TSource).Name + "_" + typeof(TTarget).Name + "Connection");
     //else
     //{
     //    container.RegisterInstance<IConnectionStrategy>(new OneToOneConnectionStrategy<TSource, TTarget>(), typeof(TSource).Name + "_" + typeof(TTarget).Name + "Connection");
     //}
     return(container);
 }