public TypeReference GetUseExpressionTypeNode(Instruction instruction, Expression instructionExpression, VariableReference variable)
 {
     V_0 = instruction.get_OpCode().get_Code();
     if (V_0 == 112)
     {
         return(instruction.get_Operand() as TypeReference);
     }
     if (UsedAsTypeHelper.IsConditionalBranch(V_0))
     {
         return(this.typeSystem.get_Boolean());
     }
     if (V_0 == 37)
     {
         return(null);
     }
     return(this.GetUseExpressionTypeNode(instructionExpression, variable));
 }
 private bool IsOnlyUsedOnce(VariableReference variable, out TypeReference type)
 {
     type = null;
     if (!this.context.get_MethodContext().get_StackData().get_VariableToDefineUseInfo().TryGetValue(variable.Resolve(), out V_0))
     {
         throw new Exception("Define/use info not found.");
     }
     if (V_0.get_UsedAt().get_Count() != 1)
     {
         return(false);
     }
     V_1  = this.First <int>(V_0.get_UsedAt());
     V_2  = new UsedAsTypeHelper(this.context.get_MethodContext());
     V_3  = this.context.get_MethodContext().get_ControlFlowGraph().get_OffsetToInstruction().get_Item(V_1);
     type = V_2.GetUseExpressionTypeNode(V_3, this.offsetToExpression.get_Item(V_1), variable);
     return(true);
 }
        private bool IsOnlyUsedOnce(VariableReference variable, out TypeReference type)
        {
            type = null;
            StackVariableDefineUseInfo defineUseInfo;

            if (!context.MethodContext.StackData.VariableToDefineUseInfo.TryGetValue(variable.Resolve(), out defineUseInfo))
            {
                throw new Exception("Define/use info not found.");
            }

            if (defineUseInfo.UsedAt.Count != 1)
            {
                return(false);
            }

            int instructionOffset        = First(defineUseInfo.UsedAt);
            UsedAsTypeHelper uath        = new UsedAsTypeHelper(context.MethodContext);
            Instruction      instruction = context.MethodContext.ControlFlowGraph.OffsetToInstruction[instructionOffset];

            type = uath.GetUseExpressionTypeNode(instruction, offsetToExpression[instructionOffset], variable);
            return(true);
        }