예제 #1
0
        public IKernel GetKernel(ResolverModuleType mType)
        {
            IKernel result;

            switch (mType)
            {
            case ResolverModuleType.Bl:
            {
                result = NiInjectKernel.GetBlKernel();
            }
            break;

            case ResolverModuleType.Dal:
            {
                result = NiInjectKernel.GetDalKernel();
            }
            break;

            case ResolverModuleType.Web:
            {
                result = NiInjectKernel.GetWebKernel();
            }
            break;

            default:
                result = NiInjectKernel.GetWebKernel();
                break;
            }
            return(result);
        }
예제 #2
0
 public T ResolveByType <T>(ResolverModuleType mType)
 {
     return(GetKernel(mType).Get <T>());
 }