Пример #1
0
 private static Expression ParseSizeOf(IOperation currentOperation) {
   Contract.Requires(currentOperation != null);
   SizeOf result = new SizeOf();
   result.TypeToSize = (ITypeReference)currentOperation.Value;
   return result;
 }
Пример #2
0
 private static Expression ParseSizeOf(IOperation currentOperation)
 {
     SizeOf result = new SizeOf();
       result.TypeToSize = (ITypeReference)currentOperation.Value;
       return result;
 }
Пример #3
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 public override void Visit(ISizeOf sizeOf)
 {
     SizeOf mutableSizeOf = new SizeOf(sizeOf);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableSizeOf);
 }
Пример #4
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 /// <returns></returns>
 protected virtual IExpression DeepCopy(SizeOf sizeOf)
 {
     sizeOf.TypeToSize = this.Substitute(sizeOf.TypeToSize);
       sizeOf.Type = this.Substitute(sizeOf.Type);
       return sizeOf;
 }
Пример #5
0
 /// <summary>
 /// Rewrites the children of the given sizeof() expression.
 /// </summary>
 public virtual void RewriteChildren(SizeOf sizeOf)
 {
     this.RewriteChildren((Expression)sizeOf);
       sizeOf.TypeToSize = this.Rewrite(sizeOf.TypeToSize);
 }
Пример #6
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 public override void Visit(ISizeOf sizeOf)
 {
     SizeOf mutableSizeOf = sizeOf as SizeOf;
     if (alwaysMakeACopy || mutableSizeOf == null) mutableSizeOf = new SizeOf(sizeOf);
     this.resultExpression = this.myCodeMutator.Visit(mutableSizeOf);
 }
Пример #7
0
 /// <summary>
 /// Visits the specified size of.
 /// </summary>
 /// <param name="sizeOf">The size of.</param>
 /// <returns></returns>
 public virtual IExpression Visit(SizeOf sizeOf)
 {
     sizeOf.TypeToSize = Visit(sizeOf.TypeToSize);
       sizeOf.Type = this.Visit(sizeOf.Type);
       return sizeOf;
 }