Пример #1
0
        public PropertyReflector <TInstance, TProperty> GetProperty <TProperty>(Expression <Func <TInstance, TProperty> > propertyExpression)
        {
            TInstance instance = (TInstance)InstanceGetter.GetInstance();
            var       finder   = new ExpressionPropertyFinder <TInstance, TProperty>(propertyExpression);

            return(new PropertyReflector <TInstance, TProperty>(instance, finder));
        }
Пример #2
0
        public WeakMethodReflector <TInstance, TReturn> GetMethod <TReturn>(Expression <Func <TInstance, TReturn> > expression)
        {
            TInstance instance = (TInstance)InstanceGetter.GetInstance();
            var       finder   = new ExpressionMethodFinder <TInstance, TReturn>(expression);

            return(new WeakMethodReflector <TInstance, TReturn>(instance, finder));
        }