コード例 #1
0
 private static void Register <TBase>(this IIoCContainer container,
                                      IoCLifecycle lifecycle,
                                      Func <TBase> factory)
     where TBase : class
 => container.Register(lifecycle, typeof(TBase), factory);
コード例 #2
0
 private static void Register <TBase, TImplementation>(this IIoCContainer container,
                                                       IoCLifecycle lifecycle)
     where TBase : class
     where TImplementation : class, TBase
 => container.Register(lifecycle, typeof(TBase), typeof(TImplementation));