/// <summary>
        /// Stops the Host and releases the host AppDomain and cached
        /// assemblies.
        /// </summary>
        /// <returns>true or false</returns>
        public bool Stop()
        {
            this.LoadedAssemblies.Clear();

            RazorEngineFactory <RazorTemplateBase> .UnloadRazorHostInAppDomain();

            this.Engine = null;
            return(true);
        }
예제 #2
0
        /// <summary>
        /// Stops the Host and releases the host AppDomain and cached
        /// assemblies.
        /// </summary>
        /// <returns>true or false</returns>
        public bool Stop()
        {
            if (Engine != null)
            {
                // Release cached assemblies
                LoadedAssemblies.Clear();

                RazorEngineFactory <RazorTemplateBase> .UnloadRazorHostInAppDomain();

                Engine = null;
            }

            return(true);
        }