~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
                
116
116
                internal static bool IsAnonymousMethod(DecompilerContext context, MethodDefinition method)
117
117
                {
118
 
                        if (method == null || !(method.Name.StartsWith("<", StringComparison.Ordinal) || method.Name.Contains("$")))
 
118
                        if (method == null || !(method.HasGeneratedName() || method.Name.Contains("$")))
119
119
                                return false;
120
120
                        if (!(method.IsCompilerGenerated() || IsPotentialClosure(context, method.DeclaringType)))
121
121
                                return false;
151
151
                        
152
152
                        DecompilerContext subContext = context.Clone();
153
153
                        subContext.CurrentMethod = method;
 
154
                        subContext.CurrentMethodIsAsync = false;
154
155
                        subContext.ReservedVariableNames.AddRange(currentlyUsedVariableNames);
155
156
                        BlockStatement body = AstMethodBodyBuilder.CreateMethodBody(method, subContext, ame.Parameters);
156
157
                        TransformationPipeline.RunTransformationsUntil(body, v => v is DelegateConstruction, subContext);