Ejemplo n.º 1
0
        public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
        {
            var retMetaObject    = _innerBinder.Bind(target, new[] { value });
            var noThrowVisitor   = new NoThrowExpressionVisitor();
            var resultExpression = noThrowVisitor.Visit(retMetaObject.Expression);
            var finalMetaObject  = new DynamicMetaObject(resultExpression, retMetaObject.Restrictions);

            return(finalMetaObject);
        }
Ejemplo n.º 2
0
 public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
 {
     var retMetaObject = _innerBinder.Bind(target, new[] { value });
     var noThrowVisitor = new NoThrowExpressionVisitor();
     var resultExpression = noThrowVisitor.Visit(retMetaObject.Expression);
     var finalMetaObject = new DynamicMetaObject(resultExpression, retMetaObject.Restrictions);
     return finalMetaObject;
 }