public override void Dispose() { lock (syncRoot) { if (!IsDisposed) { //Expander = null; if (AccessorParametersManager != null) { AccessorParametersManager.Dispose(); AccessorParametersManager = null; } if (Renderer != null) { Renderer.Dispose(); Renderer = null; } CellsThatContainSearchValue.Clear(); if (ViewSheet != null) { ExcelApplication.ReleaseComObject(ViewSheet); ViewSheet = null; } FirstOutputCell = null; currentSelectedRange = null; ClearingCell = null; base.Dispose(); } } }
public void SetAccessorParameters(IEnumerable <object> parameters) { lock (syncRoot) { if (!IsDisposed) { AccessorParametersManager?.Dispose(); AccessorParametersManager = new AccessorParametersManager(this, parameters); } } }