From fd324e1e6101f014c81637d56157b96db35816a1 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Mon, 13 Nov 2017 09:58:37 +0100 Subject: [PATCH] Remove unused code. VS2017 was finding unused code that CA wasn't finding. This also fixes the build on VS2017. --- .../ViewModels/CommentThreadViewModel.cs | 17 +---------------- .../NewInlineCommentThreadViewModel.cs | 5 ----- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs b/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs index 0a678303f5..e0c814ae24 100644 --- a/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs @@ -9,10 +9,9 @@ namespace GitHub.InlineReviews.ViewModels /// /// Base view model for a thread of comments. /// - public abstract class CommentThreadViewModel : ReactiveObject, ICommentThreadViewModel, IDisposable + public abstract class CommentThreadViewModel : ReactiveObject, ICommentThreadViewModel { ReactiveCommand postComment; - IDisposable placeholderSubscription; /// /// Intializes a new instance of the class. @@ -48,21 +47,7 @@ public ReactiveCommand PostComment /// public IAccount CurrentUser { get; } - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - /// public abstract Uri GetCommentUrl(int id); - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - placeholderSubscription?.Dispose(); - } - } } } diff --git a/src/GitHub.InlineReviews/ViewModels/NewInlineCommentThreadViewModel.cs b/src/GitHub.InlineReviews/ViewModels/NewInlineCommentThreadViewModel.cs index 3f71c5bf30..9b625b004c 100644 --- a/src/GitHub.InlineReviews/ViewModels/NewInlineCommentThreadViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/NewInlineCommentThreadViewModel.cs @@ -1,10 +1,7 @@ using System; using System.Linq; -using System.Reactive; using System.Reactive.Linq; -using System.Reactive.Subjects; using System.Threading.Tasks; -using GitHub.Api; using GitHub.Extensions; using GitHub.Models; using GitHub.Services; @@ -17,7 +14,6 @@ namespace GitHub.InlineReviews.ViewModels /// public class NewInlineCommentThreadViewModel : CommentThreadViewModel { - readonly Subject finished = new Subject(); bool needsPush; /// @@ -116,7 +112,6 @@ async Task DoPostComment(object parameter) File.RelativePath.Replace("\\", "/"), diffPosition.DiffLineNumber); - finished.OnNext(Unit.Default); return model; } }