public override ICodeNode VisitExplicitCastExpression(ExplicitCastExpression node)
 {
     if (node.get_Expression().get_CodeNodeType() != 22)
     {
         return(this.VisitExplicitCastExpression(node));
     }
     V_0 = node.get_ExpressionType().Resolve();
     if (V_0 == null || !V_0.get_IsEnum() || node.get_ExpressionType().get_IsArray())
     {
         return(node);
     }
     return(EnumHelper.GetEnumExpression(node.get_ExpressionType().Resolve(), node.get_Expression() as LiteralExpression, this.typeSystem));
 }
Exemplo n.º 2
0
 public override void VisitExplicitCastExpression(ExplicitCastExpression node)
 {
     this.get_TypesDependingOn().UnionWith(Utilities.GetTypeReferenceTypesDepedningOn(node.get_ExpressionType()));
     if (node.get_UnresolvedReferenceForAmbiguousCastToObject() != null)
     {
         dummyVar0 = this.get_AmbiguousCastsToObject().Add(node);
     }
     this.VisitExplicitCastExpression(node);
     return;
 }
 private void HandleCastArgument(TypeReference parameterType, ExplicitCastExpression castArgument)
 {
     if (String.op_Equality(parameterType.get_FullName(), this.currentTypeSystem.get_Char().get_FullName()) && String.op_Equality(castArgument.get_ExpressionType().get_FullName(), this.currentTypeSystem.get_UInt16().get_FullName()))
     {
         castArgument.set_TargetType(this.currentTypeSystem.get_Char());
     }
     return;
 }