/// <summary> /// Fluent-метод применения ошибки /// </summary> /// <param name="error"></param> /// <param name="el"></param> /// <param name="a"></param> /// <param name="e"></param> /// <returns></returns> public PortableHtmlContext SetError(PortableHtmlSchemaErorr error, XElement el = null, XAttribute a = null, Exception e = null) { var desc = new PortableHtmlSchemaErorrDescription(error, el, a, e); return(SetError(desc)); }
/// <summary> /// Установить заранее подготовленный дескриптор ошибки /// </summary> /// <param name="error"></param> /// <returns></returns> public PortableHtmlContext SetError(PortableHtmlSchemaErorrDescription error) { if (null != error.Element && Strategy != PortableHtmlVerificationStrategy.Full) { error.Element.AddAnnotation(SkipInElementChecking.Default); } SchemaError |= error.Error; Errors.Add(error); Exception = Exception ?? error.Exception; return(this); }