Esempio n. 1
0
 ResolveVisitor.ConversionWithTargetType GetConversionWithTargetType(Expression expr, CancellationToken cancellationToken)
 {
     if (expr == null || expr.IsNull)
     {
         throw new ArgumentNullException("expr");
     }
     InitResolver();
     resolveVisitor.cancellationToken = cancellationToken;
     try {
         return(resolveVisitor.GetConversionWithTargetType(expr));
     } finally {
         resolveVisitor.cancellationToken = CancellationToken.None;
     }
 }
Esempio n. 2
0
 ResolveVisitor.ConversionWithTargetType GetConversionWithTargetType(Expression expr, CancellationToken cancellationToken)
 {
     if (expr == null || expr.IsNull)
     {
         return(new ResolveVisitor.ConversionWithTargetType(Conversion.None, SpecialType.UnknownType));
     }
     lock (resolveVisitor) {
         InitResolver();
         resolveVisitor.cancellationToken = cancellationToken;
         try {
             return(resolveVisitor.GetConversionWithTargetType(expr));
         } finally {
             resolveVisitor.cancellationToken = CancellationToken.None;
         }
     }
 }