public override BuildFormat Clone() { FormatChm format = new FormatChm(this); base.Clone(format); if (_compilerFile != null) { format._compilerFile = _compilerFile.Clone(); } return(format); }
public bool Run(BuildContext context) { _context = context; _logger = context.Logger; BuildSettings settings = context.Settings; FormatChm format = settings.Formats[BuildFormatType.HtmlHelp1] as FormatChm; if (format == null) { throw new BuildException( "FormatChmHelper: The build format is not available."); } string dataDir = Path.Combine(_options.OutputDirectory, "Data"); try { _plusTree = new PersistentDictionary <string, string>(dataDir); _indentCount = 0; WriteHtmls(); WriteHhk(); if (_hasToc) { WriteHhc(); } WriteHhp(); return(true); } catch (System.Exception ex) { if (_logger != null) { _logger.WriteLine(ex, BuildLoggerLevel.Error); } return(false); } finally { if (_plusTree != null) { _plusTree.Dispose(); } } }
public FormatChm(FormatChm source) : base(source) { _useAutoIndex = source._useAutoIndex; _useBinaryToc = source._useBinaryToc; _useBinaryIndex = source._useBinaryIndex; _useFullTextSearch = source._useFullTextSearch; _includeFavorites = source._includeFavorites; _includeStopWords = source._includeStopWords; _includeAdvancedSearch = source._includeAdvancedSearch; _compilerFile = source._compilerFile; _tocHasButtons = source._tocHasButtons; _tocHasLines = source._tocHasLines; _tocLinesAtRoot = source._tocLinesAtRoot; _tocShowSelAlways = source._tocShowSelAlways; _tocTrackSelect = source._tocTrackSelect; _tocSingleExpand = source._tocSingleExpand; _tocFullrowSelect = source._tocFullrowSelect; }