public static TemplateErrorCollection ToTemplateErrorCollection(this CompilerErrorCollection errors) { if (errors == null) { throw new ArgumentNullException(nameof(errors)); } var templateErrors = new TemplateErrorCollection(); foreach (CompilerError error in errors) { templateErrors.Add(new TemplateError(error.ErrorText, error.ErrorNumber, new Location(error.FileName, error.Line, error.Column), error.IsWarning)); } return(templateErrors); }
void ITextTemplatingEngineHost.LogErrors(TemplateErrorCollection errors) { Errors.AddRange(errors); }
public void AddRange(TemplateErrorCollection errors) { this.errors.AddRange(errors); }