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

            return((T)value);
        }
Esempio n. 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);
        }