コード例 #1
0
        /// <summary>
        /// Dispose the current instance
        /// </summary>
        /// <param name="isDisposing"><c>True</c> if disposing, false otherwise.</param>
        protected virtual void Dispose(bool isDisposing)
        {
            m_workerSource.Cancel();

            if (m_channel != null)
            {
                try { m_channel.Retire(); }
                catch { /* Ignore retire errors */ }
            }

            AutomationExtensions.RetireAllChannels(this);
        }
コード例 #2
0
ファイル: ProcessHelper.cs プロジェクト: kenkendk/cocol
 /// <summary>
 /// <summary>
 /// Releases all resource used by the <see cref="CoCoL.ProcessHelper"/> object.
 /// </summary>
 /// <remarks>Call <see cref="Dispose()"/> when you are finished using the <see cref="CoCoL.ProcessHelper"/>. The
 /// <see cref="Dispose()"/> method leaves the <see cref="CoCoL.ProcessHelper"/> in an unusable state. After calling
 /// <see cref="Dispose()"/>, you must release all references to the <see cref="CoCoL.ProcessHelper"/> so the garbage
 /// collector can reclaim the memory that the <see cref="CoCoL.ProcessHelper"/> was occupying.</remarks>
 /// </summary>
 /// <param name="disposing">If set to <c>true</c> disposing.</param>
 public virtual void Dispose(bool disposing)
 {
     AutomationExtensions.RetireAllChannels(this);
 }