/// <summary> /// Called when the context object has been built. /// </summary> /// <param name="lastSourceId">The last source identifier.</param> protected virtual void OnParsingComplete(int lastSourceId) { ParsingComplete?.Invoke(this, new ODMAdapterEventArgs() { LastSourceID = lastSourceId }); }
private void ParseFile(string path) { lock (locker) { var items = new List <ValuesBunch>(); try { using var wb = new XLWorkbook(path); foreach (var sheet in wb.Worksheets) { items.AddRange(ReadWorkSheet(sheet)); } } catch { } Items = items; ParsingComplete?.Invoke(this, new List <ValuesBunch>(items)); } }