コード例 #1
0
ファイル: DynamicUtils.cs プロジェクト: sishui198/AjaxEngine
        public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
        {
            DynamicMetaObject retMetaObject = _innerBinder.Bind(target, new DynamicMetaObject[] { value });

            NoThrowExpressionVisitor noThrowVisitor = new NoThrowExpressionVisitor();
            Expression resultExpression             = noThrowVisitor.Visit(retMetaObject.Expression);

            DynamicMetaObject finalMetaObject = new DynamicMetaObject(resultExpression, retMetaObject.Restrictions);

            return(finalMetaObject);
        }
コード例 #2
0
ファイル: DynamicUtils.cs プロジェクト: SaintLoong/AjaxEngine
        public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
        {
            DynamicMetaObject retMetaObject = _innerBinder.Bind(target, new DynamicMetaObject[] { value });

              NoThrowExpressionVisitor noThrowVisitor = new NoThrowExpressionVisitor();
              Expression resultExpression = noThrowVisitor.Visit(retMetaObject.Expression);

              DynamicMetaObject finalMetaObject = new DynamicMetaObject(resultExpression, retMetaObject.Restrictions);
              return finalMetaObject;
        }