KeePass.UI.AsyncPwListUpdate.SprCompileFn C# (CSharp) Method

SprCompileFn() static private method

static private SprCompileFn ( string strText, PwListItem li ) : string
strText string
li PwListItem
return string
        internal static string SprCompileFn(string strText, PwListItem li)
        {
            string strCmp = null;

            while(strCmp == null)
            {
                try
                {
                    strCmp = SprEngine.Compile(strText, MainForm.GetEntryListSprContext(
                        li.Entry, Program.MainForm.DocumentManager.SafeFindContainerOf(
                        li.Entry)));
                }
                catch(InvalidOperationException) { } // Probably collection changed
                catch(NullReferenceException) { } // Objects disposed already
                catch(Exception) { Debug.Assert(false); }
            }

            if(strCmp == strText) return strText;
            return (strCmp + " - " + strText);
        }