/// <summary> /// Visits the specified ref argument. /// </summary> /// <param name="refArgument">The ref argument.</param> public override void Visit(IRefArgument refArgument) { RefArgument mutableRefArgument = new RefArgument(refArgument); this.resultExpression = this.myCodeCopier.DeepCopy(mutableRefArgument); }
/// <summary> /// Visits the specified ref argument. /// </summary> /// <param name="refArgument">The ref argument.</param> /// <returns></returns> protected virtual IExpression DeepCopy(RefArgument refArgument) { refArgument.Expression = (IAddressableExpression)this.Substitute(refArgument.Expression); refArgument.Type = this.Substitute(refArgument.Type); return refArgument; }
/// <summary> /// Rewrites the children of the given ref argument expression. /// </summary> public virtual void RewriteChildren(RefArgument refArgument) { this.RewriteChildren((Expression)refArgument); refArgument.Expression = this.Rewrite((AddressableExpression)refArgument.Expression); }
/// <summary> /// Visits the specified ref argument. /// </summary> /// <param name="refArgument">The ref argument.</param> /// <returns></returns> public virtual IExpression Visit(RefArgument refArgument) { refArgument.Expression = Visit(refArgument.Expression); refArgument.Type = this.Visit(refArgument.Type); return refArgument; }
/// <summary> /// Visits the specified ref argument. /// </summary> /// <param name="refArgument">The ref argument.</param> public override void Visit(IRefArgument refArgument) { RefArgument mutableRefArgument = refArgument as RefArgument; if (alwaysMakeACopy || mutableRefArgument == null) mutableRefArgument = new RefArgument(refArgument); this.resultExpression = this.myCodeMutator.Visit(mutableRefArgument); }