Ejemplo n.º 1
0
        /// <summary>
        /// This is overridden to save the updated cache information and dispose of target information
        /// </summary>
        /// <param name="disposing">Pass true to dispose of the managed and unmanaged resources or false to just
        /// dispose of the unmanaged resources.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && msdnResolver != null && !msdnResolver.IsDisposed)
            {
                this.UpdateMsdnContentIdCache();
                msdnResolver.Dispose();
            }

            if (targets != null)
            {
                targets.Dispose();

                foreach (var td in sharedTargets.Values.ToList())
                {
                    if (td.IsDisposed)
                    {
                        sharedTargets.Remove(td.DictionaryId);
                    }
                }
            }

            base.Dispose(disposing);
        }