Exemplo n.º 1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        protected internal override void Flush()
        {
            if (OwnerMethod.IdentifyAnonymousMethods(out m_Identification))
            {
                if (m_Identification.ClosuresRequired)
                {
                    WriteClosures();
                }

                WriteAnonymousMethodsThatHaveNoClosure();
            }
        }
Exemplo n.º 2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        private void WriteClosures()
        {
            m_Identification.DefineClosures();

            foreach (var closure in m_Identification.ClosuresOuterToInner)
            {
                closure.ImplementClosure();
            }

            var hostMethodRewriter = new ClosureHostMethodRewritingVisitor(m_Identification);

            OwnerMethod.AcceptVisitor(hostMethodRewriter);
        }