Ejemplo n.º 1
0
        public static Jinja2Wrapper GetInstance()
        {
            if (_instance == null)
            {
                _instance = new Jinja2Wrapper();
            }

            return(_instance);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Leaving this constructor public in order to give consumers the option of managing
 /// the instance themselves. The recommended way to spin up an instance of 'Environment'
 /// is to invoke the Bootrap method and then the GetInstance method.
 /// </summary>
 /// <param name="templateRoot">The absolute path to your Jinja2 style templates.</param>
 public Environment(string templateRoot)
 {
     _jinja2     = Jinja2Wrapper.GetInstance();
     _jinja2_env = _jinja2.GetEnvironment(templateRoot, null);
 }