Пример #1
0
        public IExpression TypeOf(ITypeReference typeReference)
        {
            var typeOf = new TypeOf();
            typeOf.TypeToGet = typeReference;
            typeOf.Type = reflector.Get<Type>();

            return typeOf;
        }
Пример #2
0
 /// <summary>
 /// Visits the specified type of.
 /// </summary>
 /// <param name="typeOf">The type of.</param>
 public override void Visit(ITypeOf typeOf)
 {
     TypeOf mutableTypeOf = new TypeOf(typeOf);
     this.resultExpression = this.myCodeCopier.DeepCopy(mutableTypeOf);
 }
Пример #3
0
 /// <summary>
 /// Visits the specified type of.
 /// </summary>
 /// <param name="typeOf">The type of.</param>
 /// <returns></returns>
 protected virtual IExpression DeepCopy(TypeOf typeOf)
 {
     typeOf.TypeToGet = this.Substitute(typeOf.TypeToGet);
       typeOf.Type = this.Substitute(typeOf.Type);
       return typeOf;
 }
Пример #4
0
 /// <summary>
 /// Rewrites the children of the given typeof() expression.
 /// </summary>
 public virtual void RewriteChildren(TypeOf typeOf)
 {
     this.RewriteChildren((Expression)typeOf);
       typeOf.TypeToGet = this.Rewrite(typeOf.TypeToGet);
 }
Пример #5
0
 /// <summary>
 /// Visits the specified type of.
 /// </summary>
 /// <param name="typeOf">The type of.</param>
 public override void Visit(ITypeOf typeOf)
 {
     TypeOf mutableTypeOf = typeOf as TypeOf;
     if (alwaysMakeACopy || mutableTypeOf == null) mutableTypeOf = new TypeOf(typeOf);
     this.resultExpression = this.myCodeMutator.Visit(mutableTypeOf);
 }
Пример #6
0
 /// <summary>
 /// Visits the specified type of.
 /// </summary>
 /// <param name="typeOf">The type of.</param>
 /// <returns></returns>
 public virtual IExpression Visit(TypeOf typeOf)
 {
     typeOf.TypeToGet = Visit(typeOf.TypeToGet);
       typeOf.Type = this.Visit(typeOf.Type);
       return typeOf;
 }