public IExpression TypeOf(ITypeReference typeReference) { var typeOf = new TypeOf(); typeOf.TypeToGet = typeReference; typeOf.Type = reflector.Get<Type>(); return typeOf; }
/// <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); }
/// <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; }
/// <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); }
/// <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); }
/// <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; }