//-----------------------------------------------------------------------------------------------------------------------------------------------------

        private void AddOrUpdateAnonymousMethod(IAnonymousMethodOperand anonymousMethod, AnonymousMethodScope scope)
        {
            AnonymousMethodScope existingScope;

            if (!m_AnonymousMethods.TryGetValue(anonymousMethod, out existingScope) || scope > existingScope)
            {
                m_AnonymousMethods[anonymousMethod] = scope;
            }
        }
Example #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        private void WriteAnonymousMethodThatHasNoClosure(IAnonymousMethodOperand anonymousMethod, AnonymousMethodScope scope)
        {
            anonymousMethod.CreateAnonymousMethod(
                OwnerMethod.OwnerClass,
                closure: null,
                isStatic: scope == AnonymousMethodScope.Static,
                isPublic: false);

            anonymousMethod.WriteCallSite();
        }