private void M_child_Disposed(object sender, EventArgs e) { if (m_child != null) { m_child.Disposed -= this.M_child_Disposed; m_child = null; } }
private void M_firstLevel_Disposed(object sender, EventArgs e) { if (m_firstLevel != null) { m_firstLevel.Disposed -= M_firstLevel_Disposed; m_firstLevel = null; } }
public void ClearSublevels() { if (m_child != null) { m_child.ClearSublevels(); m_child = null; } }
public IExecutionScopeStatusUpdate CreateProgressReporter(string text = "", TimeSpan expectedTime = default(TimeSpan), long progressMax = -1L, Func <long, string> progressFormatter = null) { if (m_firstLevel != null) { this.ClearSublevels(); } m_firstLevel = new ExecutionScopeStatusUpdater(text, expectedTime, progressMax, progressFormatter); m_firstLevel.Disposed += M_firstLevel_Disposed; return(m_firstLevel); }
public IExecutionScopeStatusUpdate CreateProgressReporter( string text = "", TimeSpan expectedTime = default(TimeSpan), long progressMax = -1, //bool newStatusLevel = false, Func <long, string> progressFormatter = null) { if (m_child != null) { this.ClearSublevels(); } m_child = new ExecutionScopeStatusUpdater(text, expectedTime, progressMax, progressFormatter); m_child.m_level = m_level + 1; m_child.Disposed += this.M_child_Disposed; return(m_child); }