2 writes to _viewer
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Preview\DifferenceViewerPreview.cs (2)
33
_viewer
= viewer;
76
_viewer
= null;
14 references to _viewer
Microsoft.CodeAnalysis.EditorFeatures.Wpf (14)
Preview\DifferenceViewerPreview.cs (14)
35
_viewer
.VisualElement.IsKeyboardFocusWithinChanged += OnDifferenceViewerKeyboardFocusWithinChanged;
36
_hasFocus =
_viewer
.VisualElement.IsKeyboardFocusWithin;
38
var host =
_viewer
.ViewMode switch
40
DifferenceViewMode.Inline =>
_viewer
.InlineHost,
41
DifferenceViewMode.LeftViewOnly =>
_viewer
.LeftHost,
42
DifferenceViewMode.RightViewOnly =>
_viewer
.RightHost,
43
_ => throw ExceptionUtilities.UnexpectedValue(
_viewer
.ViewMode),
56
Contract.ThrowIfNull(
_viewer
);
57
return
_viewer
;
67
if (
_viewer
!= null)
70
_viewer
.VisualElement.IsKeyboardFocusWithinChanged -= OnDifferenceViewerKeyboardFocusWithinChanged;
72
if (!
_viewer
.IsClosed)
73
_viewer
.Close();
90
FatalError.ReportAndCatch(new Exception($"Dispose is not called how? viewer state : {
_viewer
?.IsClosed}"));