예제 #1
0
        public static T Resolve <T>() where T : class
        {
            INvocationHandler hanlder = new DefaultInvocationHandler <T>();
            object            value   = New(typeof(T), hanlder);

            return((T)value);
        }
예제 #2
0
        public static T New <T>() where T : class
        {
            INvocationHandler hanlder = new DefaultInvocationHandler <T>();
            object            value   = New(typeof(T), hanlder);

            if (value == null)
            {
                return(null);
            }
            return((T)value);
        }