Пример #1
0
        public object Clone()
        {
            CompilerOptimizedSwitchByStringData clone = new CompilerOptimizedSwitchByStringData();

            clone.SwitchBlocksStartInstructions = new List <int>(this.SwitchBlocksStartInstructions);
            clone.SwitchBlocksToCasesMap        = new Dictionary <int, List <int> >();
            foreach (KeyValuePair <int, List <int> > pair in this.SwitchBlocksToCasesMap)
            {
                clone.SwitchBlocksToCasesMap.Add(pair.Key, new List <int>(pair.Value));
            }

            return(clone);
        }
Пример #2
0
 public object Clone()
 {
     V_0 = new CompilerOptimizedSwitchByStringData();
     V_0.set_SwitchBlocksStartInstructions(new List <int>(this.get_SwitchBlocksStartInstructions()));
     V_0.set_SwitchBlocksToCasesMap(new Dictionary <int, List <int> >());
     V_1 = this.get_SwitchBlocksToCasesMap().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_0.get_SwitchBlocksToCasesMap().Add(V_2.get_Key(), new List <int>(V_2.get_Value()));
         }
     }
     finally
     {
         ((IDisposable)V_1).Dispose();
     }
     return(V_0);
 }
Пример #3
0
 internal MethodSpecificContext(DecompilationAnalysisResults analysisResults, Telerik.JustDecompiler.Decompiler.YieldData yieldData, Telerik.JustDecompiler.Decompiler.AsyncData asyncData, bool isMethodBodyChanged, Dictionary <string, Statement> gotoLabels, List <GotoStatement> gotoStatements, StackUsageData stackData, bool isBaseConstructorInvokingConstructor, bool enableEventAnalysis, MethodBody body, Collection <VariableDefinition> variables, Telerik.JustDecompiler.Cil.ControlFlowGraph controlFlowGraph, ExpressionDecompilerData expressions, BlockLogicalConstruct logicalConstructsTree, LogicalFlowBuilderContext logicalConstructsContext, MethodInvocationExpression ctorInvokeExpression, Dictionary <Statement, ILogicalConstruct> statementToLogicalConstruct, Dictionary <ILogicalConstruct, List <Statement> > logicalConstructToStatements, Dictionary <VariableDefinition, string> variableDefinitionToNameMap, HashSet <string> variableNamesCollection, Dictionary <ParameterDefinition, string> parameterDefinitionToNameMap, HashSet <VariableDefinition> variablesToRename, Dictionary <FieldDefinition, Expression> fieldToExpression, int lambdaVariablesCount, Dictionary <VariableDefinition, AssignmentType> variableAssignmentData, List <ParameterDefinition> outParametersToAssign, bool isDestructor, BlockStatement destructorStatements, HashSet <VariableDefinition> undeclaredLinqVariables, Dictionary <VariableReference, Dictionary <FieldDefinition, Expression> > closureVariableToFieldValue, HashSet <VariableDefinition> variablesToNotDeclare, CompilerOptimizedSwitchByStringData switchByStringData)
 {
     base();
     this.set_AnalysisResults(analysisResults);
     this.set_YieldData(yieldData);
     this.set_AsyncData(asyncData);
     this.set_IsMethodBodyChanged(isMethodBodyChanged);
     this.set_GotoLabels(gotoLabels);
     this.set_GotoStatements(gotoStatements);
     this.set_StackData(stackData);
     this.set_IsBaseConstructorInvokingConstructor(isBaseConstructorInvokingConstructor);
     this.set_EnableEventAnalysis(enableEventAnalysis);
     this.set_Body(body);
     this.set_Variables(variables);
     this.set_ControlFlowGraph(controlFlowGraph);
     this.set_Expressions(expressions);
     this.set_LogicalConstructsTree(logicalConstructsTree);
     this.set_LogicalConstructsContext(logicalConstructsContext);
     this.set_CtorInvokeExpression(ctorInvokeExpression);
     this.set_StatementToLogicalConstruct(statementToLogicalConstruct);
     this.set_LogicalConstructToStatements(logicalConstructToStatements);
     this.set_VariableDefinitionToNameMap(variableDefinitionToNameMap);
     this.set_VariableNamesCollection(variableNamesCollection);
     this.set_ParameterDefinitionToNameMap(parameterDefinitionToNameMap);
     this.set_VariablesToRename(variablesToRename);
     this.set_FieldToExpression(fieldToExpression);
     this.set_LambdaVariablesCount(lambdaVariablesCount);
     this.set_VariableAssignmentData(variableAssignmentData);
     this.set_OutParametersToAssign(outParametersToAssign);
     this.set_IsDestructor(isDestructor);
     this.set_DestructorStatements(destructorStatements);
     this.set_UndeclaredLinqVariables(undeclaredLinqVariables);
     this.set_ClosureVariableToFieldValue(closureVariableToFieldValue);
     this.set_VariablesToNotDeclare(variablesToNotDeclare);
     this.set_SwitchByStringData(switchByStringData);
     return;
 }
Пример #4
0
 internal MethodSpecificContext(DecompilationAnalysisResults analysisResults, YieldData yieldData, AsyncData asyncData,
                                bool isMethodBodyChanged, Dictionary <string, Statement> gotoLabels, List <GotoStatement> gotoStatements,
                                StackUsageData stackData, bool isBaseConstructorInvokingConstructor, bool enableEventAnalysis,
                                MethodBody body, Collection <VariableDefinition> variables, ControlFlowGraph controlFlowGraph,
                                ExpressionDecompilerData expressions, BlockLogicalConstruct logicalConstructsTree, LogicalFlowBuilderContext logicalConstructsContext,
                                MethodInvocationExpression ctorInvokeExpression, Dictionary <Statement, ILogicalConstruct> statementToLogicalConstruct,
                                Dictionary <ILogicalConstruct, List <Statement> > logicalConstructToStatements, Dictionary <VariableDefinition, string> variableDefinitionToNameMap,
                                HashSet <string> variableNamesCollection, Dictionary <ParameterDefinition, string> parameterDefinitionToNameMap,
                                HashSet <VariableDefinition> variablesToRename, Dictionary <FieldDefinition, Expression> fieldToExpression,
                                int lambdaVariablesCount, Dictionary <VariableDefinition, AssignmentType> variableAssignmentData, List <ParameterDefinition> outParametersToAssign,
                                bool isDestructor, BlockStatement destructorStatements, HashSet <VariableDefinition> undeclaredLinqVariables,
                                Dictionary <VariableReference, Dictionary <FieldDefinition, Expression> > closureVariableToFieldValue,
                                HashSet <VariableDefinition> variablesToNotDeclare, CompilerOptimizedSwitchByStringData switchByStringData)
 {
     this.AnalysisResults     = analysisResults;
     this.YieldData           = yieldData;
     this.AsyncData           = asyncData;
     this.IsMethodBodyChanged = isMethodBodyChanged;
     this.GotoLabels          = gotoLabels;
     this.GotoStatements      = gotoStatements;
     this.StackData           = stackData;
     this.IsBaseConstructorInvokingConstructor = isBaseConstructorInvokingConstructor;
     this.EnableEventAnalysis = enableEventAnalysis;
     this.Body                         = body;
     this.Variables                    = variables;
     this.ControlFlowGraph             = controlFlowGraph;
     this.Expressions                  = expressions;
     this.LogicalConstructsTree        = logicalConstructsTree;
     this.LogicalConstructsContext     = logicalConstructsContext;
     this.CtorInvokeExpression         = ctorInvokeExpression;
     this.StatementToLogicalConstruct  = statementToLogicalConstruct;
     this.LogicalConstructToStatements = logicalConstructToStatements;
     this.VariableDefinitionToNameMap  = variableDefinitionToNameMap;
     this.VariableNamesCollection      = variableNamesCollection;
     this.ParameterDefinitionToNameMap = parameterDefinitionToNameMap;
     this.VariablesToRename            = variablesToRename;
     this.FieldToExpression            = fieldToExpression;
     this.LambdaVariablesCount         = lambdaVariablesCount;
     this.VariableAssignmentData       = variableAssignmentData;
     this.OutParametersToAssign        = outParametersToAssign;
     this.IsDestructor                 = isDestructor;
     this.DestructorStatements         = destructorStatements;
     this.UndeclaredLinqVariables      = undeclaredLinqVariables;
     this.ClosureVariableToFieldValue  = closureVariableToFieldValue;
     this.VariablesToNotDeclare        = variablesToNotDeclare;
     this.SwitchByStringData           = switchByStringData;
 }