//----------------------------------------------------------------------------------------------------------------------------------------------------- private void AddOrUpdateAnonymousMethod(IAnonymousMethodOperand anonymousMethod, AnonymousMethodScope scope) { AnonymousMethodScope existingScope; if (!m_AnonymousMethods.TryGetValue(anonymousMethod, out existingScope) || scope > existingScope) { m_AnonymousMethods[anonymousMethod] = scope; } }
//----------------------------------------------------------------------------------------------------------------------------------------------------- private void WriteAnonymousMethodThatHasNoClosure(IAnonymousMethodOperand anonymousMethod, AnonymousMethodScope scope) { anonymousMethod.CreateAnonymousMethod( OwnerMethod.OwnerClass, closure: null, isStatic: scope == AnonymousMethodScope.Static, isPublic: false); anonymousMethod.WriteCallSite(); }