/// <summary>
        /// The pages from the template are unwanted if the template itself isn't visible.
        /// </summary>
        /// <remarks>
        /// Experimental templates are invisible if the user doesn't want experimental features.
        /// </remarks>
        private static bool IsTemplateInvisible(string templatePath)
        {
            var folderPath = Path.GetDirectoryName(templatePath);
            var info       = new BookInfo(folderPath, true);

            return(!info.ShowThisBookAsSource());
        }
Example #2
0
        /// <summary>
        /// The pages from the template are unwanted if the template itself isn't visible.
        /// </summary>
        /// <remarks>
        /// Experimental templates are invisible if the user doesn't want experimental features.
        /// </remarks>
        private static bool IsTemplateInvisible(string templatePath)
        {
            var folderPath = Path.GetDirectoryName(templatePath);
            // This book info should never be asked about savability, so it doesn't matter much,
            // but it feels safer to say it can't be saved.
            var info = new BookInfo(folderPath, true, new NoEditSaveContext());

            return(!info.ShowThisBookAsSource());
        }