/// <summary> /// Initializes this instance. /// </summary> protected void Initialize() { if (AttachedTarget != null && AttachedTarget.ClrVersions != null) { var dacLocation = AttachedTarget.ClrVersions.FirstOrDefault().TryGetDacLocation(); Runtime = AttachedTarget.CreateRuntime(dacLocation); } }
/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="isDisposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool isDisposing) { if (!isDisposed) { if (isDisposing) { if (AttachedTarget != null) { AttachedTarget.Dispose(); } } isDisposed = true; } }