Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 0431752

Browse files
committed
Fix all the readonlys!
1 parent 0becabd commit 0431752

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/GitHub.App/Factories/UIFactory.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public IUIPair CreateViewAndViewModel(UIViewType viewType)
4343
/// </summary>
4444
public class UIPair : IUIPair
4545
{
46-
ExportLifetimeContext<IView> view;
47-
ExportLifetimeContext<IViewModel> viewModel;
48-
CompositeDisposable handlers = new CompositeDisposable();
49-
UIViewType viewType;
46+
readonly ExportLifetimeContext<IView> view;
47+
readonly ExportLifetimeContext<IViewModel> viewModel;
48+
readonly CompositeDisposable handlers = new CompositeDisposable();
49+
readonly UIViewType viewType;
5050

5151
public UIViewType ViewType => viewType;
5252
public IView View => view.Value;
@@ -88,9 +88,7 @@ void Dispose(bool disposing)
8888
if (!handlers.IsDisposed)
8989
handlers.Dispose();
9090
view?.Dispose();
91-
view = null;
9291
viewModel?.Dispose();
93-
viewModel = null;
9492
disposed = true;
9593
}
9694
}

src/GitHub.VisualStudio/UI/Views/GitHubPaneViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace GitHub.VisualStudio.UI.Views
2626
[PartCreationPolicy(CreationPolicy.NonShared)]
2727
public class GitHubPaneViewModel : TeamExplorerItemBase, IGitHubPaneViewModel
2828
{
29-
CompositeDisposable disposables = new CompositeDisposable();
29+
readonly CompositeDisposable disposables = new CompositeDisposable();
3030
IUIController uiController;
3131
WindowController windowController;
3232

0 commit comments

Comments
 (0)