private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (this.Highlighter != null) { this.Highlighter.Dispose(); this.Highlighter = null; } } disposedValue = true; } }
/// <summary> /// Constructor /// </summary> private HighlightImageAction() { Highlighter = new ImageHighlighter(SetHighlightBtnState); }