InitializeStatic() private static method

private static InitializeStatic ( ) : void
return void
Ejemplo n.º 1
0
        public static string Compile(string strText, SprContext ctx)
        {
            if (strText == null)
            {
                Debug.Assert(false); return(string.Empty);
            }
            if (strText.Length == 0)
            {
                return(string.Empty);
            }

            SprEngine.InitializeStatic();

            if (ctx == null)
            {
                ctx = new SprContext();
            }
            ctx.RefCache.Clear();

            string str = SprEngine.CompileInternal(strText, ctx, 0);

            // if(bEscapeForAutoType && !bIsAutoTypeSequence)
            //	str = SprEncoding.MakeAutoTypeSequence(str);

            return(str);
        }
Ejemplo n.º 2
0
        public static string Compile(string strText, bool bIsAutoTypeSequence,
                                     PwEntry pwEntry, PwDatabase pwDatabase, bool bEscapeForAutoType,
                                     bool bEscapeQuotesForCommandLine)
        {
            if (strText == null)
            {
                Debug.Assert(false); return(string.Empty);
            }
            if (strText.Length == 0)
            {
                return(string.Empty);
            }

            SprEngine.InitializeStatic();

            SprContentFlags cf = new SprContentFlags(bEscapeForAutoType &&
                                                     bIsAutoTypeSequence, bEscapeQuotesForCommandLine);

            SprRefsCache vRefsCache = new SprRefsCache();

            string str = SprEngine.CompileInternal(strText, pwEntry, pwDatabase,
                                                   cf, 0, vRefsCache);

            if (bEscapeForAutoType && !bIsAutoTypeSequence)
            {
                str = SprEncoding.MakeAutoTypeSequence(str);
            }

            return(str);
        }