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);
        }
Exemplo n.º 2
0
 void ITextTemplatingEngineHost.LogErrors(TemplateErrorCollection errors)
 {
     Errors.AddRange(errors);
 }
Exemplo n.º 3
0
 public void AddRange(TemplateErrorCollection errors)
 {
     this.errors.AddRange(errors);
 }