Skip to content

Commit 30dcc6d

Browse files
authored
Merge pull request #510 from tonyhallett/remove-event-handler
remove event handler
2 parents b570ece + 600e7c0 commit 30dcc6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

FineCodeCoverageTests/Editor/DynamicCoverage/BufferLineCoverage_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void Should_Stop_Listening_When_TextView_Closed()
111111

112112
autoMoqer.Verify<IEventAggregator>(eventAggregator => eventAggregator.RemoveListener(bufferLineCoverage));
113113
mockTextView.VerifyRemove(textView => textView.Closed -= It.IsAny<EventHandler>(), Times.Once);
114-
mockTextBuffer.VerifyRemove(textBuffer => textBuffer.Changed -= It.IsAny<EventHandler<TextContentChangedEventArgs>>(), Times.Once);
114+
mockTextBuffer.VerifyRemove(textBuffer => textBuffer.ChangedOnBackground -= It.IsAny<EventHandler<TextContentChangedEventArgs>>(), Times.Once);
115115
var mockAppOptionsProvider = autoMoqer.GetMock<IAppOptionsProvider>();
116116
mockAppOptionsProvider.VerifyRemove(appOptionsProvider => appOptionsProvider.OptionsChanged -= It.IsAny<Action<IAppOptions>>(), Times.Once);
117117
}

SharedProject/Editor/DynamicCoverage/Management/BufferLineCoverage.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void AppOptionsChanged(IAppOptions appOptions)
9090
void textViewClosedHandler(object s, EventArgs e)
9191
{
9292
this.UpdateDynamicCoverageStore((s as ITextView).TextSnapshot);
93-
this.textBuffer.Changed -= this.TextBuffer_ChangedOnBackground;
93+
this.textBuffer.ChangedOnBackground -= this.TextBuffer_ChangedOnBackground;
9494
this.textBuffer.ContentTypeChanged -= this.ContentTypeChanged;
9595
textInfo.TextView.Closed -= textViewClosedHandler;
9696
appOptionsProvider.OptionsChanged -= AppOptionsChanged;

0 commit comments

Comments
 (0)