/// <summary>
 ///
 /// </summary>
 public static void UnloadRazorHostInAppDomain()
 {
     if (Current != null)
     {
         Current.UnloadHost();
     }
     Current = null;
 }
        /// <summary>
        /// Creates an instance of the RazorHost in a new AppDomain. This
        /// version creates a static singleton that that is cached and you
        /// can call UnloadRazorHostInAppDomain to unload it.
        /// </summary>
        /// <returns></returns>
        public static RazorEngine <TBaseTemplateType> CreateRazorHostInAppDomain()
        {
            if (Current == null)
            {
                Current = new RazorEngineFactory <TBaseTemplateType>();
            }

            return(Current.GetRazorHostInAppDomain());
        }