public void Evaluate(int spreadMax) { if (!SpreadUtils.AnyChanged(XML, Validation)) { return; } RootElement.SliceCount = spreadMax; Document.SliceCount = spreadMax; for (int i = 0; i < spreadMax; i++) { try { var document = XMLNodes.AsDocument(XML[i], Validation[i]); Document[i] = document; RootElement[i] = document.Root; } catch (Exception e) { Document[i] = null; RootElement[i] = null; FLogger.Log(e); } } }
public void Evaluate(int spreadMax) { if (!SpreadUtils.AnyChanged(XML, Validation)) { return; } RootElement.SliceCount = spreadMax; Document.SliceCount = spreadMax; Success.SliceCount = spreadMax; ErrorMessage.SliceCount = spreadMax; for (int i = 0; i < spreadMax; i++) { try { var document = XMLNodes.AsDocument(XML[i], Validation[i]); Document[i] = document; RootElement[i] = document.Root; Success[i] = true; ErrorMessage[i] = null; } catch (Exception e) { Document[i] = null; RootElement[i] = null; Success[i] = false; ErrorMessage[i] = e.Message; FLogger.Log(LogType.Warning, e.Message); } } }