private MethodSpecificContext CloneAndReplaceMethodBody(MethodSpecificContext context, MethodBody methodBody)
 {
     return(new MethodSpecificContext(context.get_AnalysisResults(), context.get_YieldData(), context.get_AsyncData(), context.get_IsMethodBodyChanged(), new Dictionary <string, Statement>(context.get_GotoLabels()), new List <GotoStatement>(context.get_GotoStatements()), context.get_StackData(), context.get_IsBaseConstructorInvokingConstructor(), context.get_EnableEventAnalysis(), methodBody, new Collection <VariableDefinition>(context.get_Variables()), context.get_ControlFlowGraph(), context.get_Expressions(), context.get_LogicalConstructsTree(), context.get_LogicalConstructsContext(), context.get_CtorInvokeExpression(), new Dictionary <Statement, ILogicalConstruct>(context.get_StatementToLogicalConstruct()), new Dictionary <ILogicalConstruct, List <Statement> >(context.get_LogicalConstructToStatements()), new Dictionary <VariableDefinition, string>(context.get_VariableDefinitionToNameMap()), new HashSet <string>(context.get_VariableNamesCollection()), new Dictionary <ParameterDefinition, string>(context.get_ParameterDefinitionToNameMap()), new HashSet <VariableDefinition>(context.get_VariablesToRename()), new Dictionary <FieldDefinition, Expression>(context.get_FieldToExpression()), context.get_LambdaVariablesCount(), new Dictionary <VariableDefinition, AssignmentType>(context.get_VariableAssignmentData()), new List <ParameterDefinition>(context.get_OutParametersToAssign()), context.get_IsDestructor(), context.get_DestructorStatements(), new HashSet <VariableDefinition>(context.get_UndeclaredLinqVariables()), new Dictionary <VariableReference, Dictionary <FieldDefinition, Expression> >(context.get_ClosureVariableToFieldValue()), new HashSet <VariableDefinition>(context.get_VariablesToNotDeclare()), context.get_SwitchByStringData().Clone() as CompilerOptimizedSwitchByStringData));
 }