/// <summary> /// Processes the supplied text in a way that all text variables /// are replaced by the values of the current data item. /// </summary> /// <param name="text">The text with text variables to be processed.</param> /// <param name="clearBadVarsAndFiles">If true, BadFiles and BadVariable lists will be cleared before the process, else not.</param> /// <returns>Returns the text with all text variables replaced by the values of the current data item.</returns> public StringBuilder Process(StringBuilder text, bool clearBadVarsAndFiles) { if (clearBadVarsAndFiles) { BadFiles.Clear(); BadVariables.Clear(); } return(ReplaceTextVariablesWithValues(text, SearchTextVariables(text))); }
private void Dispose(bool disposing) { if (!_disposed) { if (disposing) { // Dispose managed resources. BadFiles.Clear(); BadVariables.Clear(); } } _disposed = true; }