GlueViewOfficialPlugins.Scripting.ScriptParsingPlugin.HandleUpdate C# (CSharp) Method

HandleUpdate() static private method

static private HandleUpdate ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void
        void HandleUpdate(object sender, EventArgs args)
        {
            lock (mStringsToApply)
            {
#if !UNIT_TESTS
                if (mControl.Enabled)
#endif
                {
                    foreach (var scriptAndContext in mStringsToApply)
                    {
                        CodeContext codeContext = scriptAndContext.Context;
                        if (codeContext == null)
                        {
                            codeContext = new CodeContext(GlueViewState.Self.CurrentElementRuntime);
                        }

                        ApplyLinesInternal(scriptAndContext.Script.Split(new char[]{'\n'}), 0, mStringsToApply.Count,
                            GlueViewState.Self.CurrentElement,
                            codeContext);
                    }
#if !UNIT_TESTS
                    mControl.FrameBasedUpdate();
#endif
                }
                mStringsToApply.Clear();
            }
        }