Exemple #1
0
        public static object Get(this IGetKernel kernel, Type type, params BindArg[] args)
        {
            if (args == null || args.Length == 0)
            {
                return(kernel.Get(type));
            }
            var argKernel = new ArgKernel(kernel, args);

            return(argKernel.Get(type));
        }
Exemple #2
0
 public static T Get <T>(this IGetKernel kernel, params BindArg[] args)
 {
     return((T)kernel.Get(typeof(T), args));
 }
Exemple #3
0
 // For syntax compatibility with NInject
 public static T Inject <T>(this IGetKernel kernel)
 {
     return(kernel.Get <T>());
 }
Exemple #4
0
 public static T Get <T>(this IGetKernel kernel)
 {
     return((T)kernel.Get(typeof(T)));
 }