Esempio n. 1
0
        internal override Expression VisitMethodCall(MethodCallExpression mcExpr)
        {
            Attribute resourceAttrib = AttributeSystem.GetAttrib(mcExpr, typeof(ResourceAttribute));

            if (resourceAttrib == null)
            {
                this.m_isExpensive = true;
            }
            else
            {
                this.m_isExpensive = this.m_isExpensive || ((ResourceAttribute)resourceAttrib).IsExpensive;
            }
            return(mcExpr);
        }
Esempio n. 2
0
 internal override Expression VisitBinary(BinaryExpression b)
 {
     if (b.Method == null)
     {
         return(base.VisitBinary(b));
     }
     else
     {
         Attribute resourceAttrib = AttributeSystem.GetAttrib(b, typeof(ResourceAttribute));
         if (resourceAttrib == null)
         {
             this.m_isExpensive = true;
         }
         else
         {
             this.m_isExpensive = this.m_isExpensive || ((ResourceAttribute)resourceAttrib).IsExpensive;
         }
         return(b);
     }
 }
Esempio n. 3
0
 internal override Expression VisitUnary(UnaryExpression u)
 {
     if (u.Method == null)
     {
         return(base.VisitUnary(u));
     }
     else
     {
         Attribute resourceAttrib = AttributeSystem.GetAttrib(u, typeof(ResourceAttribute));
         if (resourceAttrib == null)
         {
             this.m_isExpensive = true;
             this.m_isStateful  = true;
         }
         else
         {
             this.m_isExpensive = this.m_isExpensive || ((ResourceAttribute)resourceAttrib).IsExpensive;
             this.m_isStateful  = this.m_isStateful || ((ResourceAttribute)resourceAttrib).IsStateful;
         }
         return(u);
     }
 }