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

Commit d7ebeca

Browse files
More interface removing
1 parent 6c22912 commit d7ebeca

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

src/GitHub.App/SampleData/InlineAnnotationViewModelDesigner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public InlineAnnotationViewModelDesigner()
3535
Model= new InlineAnnotationModel(checkSuiteModel, checkRunModel, checkRunAnnotationModel);
3636
}
3737

38-
public IInlineAnnotationModel Model { get; }
38+
public InlineAnnotationModel Model { get; }
3939
}
4040
}

src/GitHub.App/ViewModels/GitHubPane/PullRequestFilesViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ async Task<IInlineCommentThreadModel> GetFirstCommentThread(IPullRequestFileNode
241241
return threads.FirstOrDefault();
242242
}
243243

244-
async Task<IInlineAnnotationModel> GetFirstAnnotation(IPullRequestFileNode file,
244+
async Task<InlineAnnotationModel> GetFirstAnnotation(IPullRequestFileNode file,
245245
CheckAnnotationLevel annotationLevel)
246246
{
247247
var sessionFile = await pullRequestSession.GetFile(file.RelativePath);

src/GitHub.App/ViewModels/InlineAnnotationViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ namespace GitHub.ViewModels
77
public class InlineAnnotationViewModel: IInlineAnnotationViewModel
88
{
99
/// <inheritdoc />
10-
public IInlineAnnotationModel Model { get; }
10+
public InlineAnnotationModel Model { get; }
1111

1212
/// <summary>
1313
/// Initializes a <see cref="InlineAnnotationViewModel"/>.
1414
/// </summary>
1515
/// <param name="model">The inline annotation model.</param>
16-
public InlineAnnotationViewModel(IInlineAnnotationModel model)
16+
public InlineAnnotationViewModel(InlineAnnotationModel model)
1717
{
1818
Model = model;
1919
}

src/GitHub.Exports.Reactive/ViewModels/IInlineAnnotationViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ public interface IInlineAnnotationViewModel
1010
/// <summary>
1111
/// Gets the inline annotation model.
1212
/// </summary>
13-
IInlineAnnotationModel Model { get; }
13+
InlineAnnotationModel Model { get; }
1414
}
1515
}

src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public IEnumerable<ITagSpan<InlineCommentTag>> GetTags(NormalizedSnapshotSpanCol
9292

9393
var spanThreadsByLine = spanThreads.ToDictionary(model => model.LineNumber);
9494

95-
Dictionary<int, IInlineAnnotationModel[]> spanAnnotationsByLine = null;
95+
Dictionary<int, InlineAnnotationModel[]> spanAnnotationsByLine = null;
9696
if (side == DiffSide.Right)
9797
{
9898
var spanAnnotations = file.InlineAnnotations.Where(x =>
@@ -121,7 +121,7 @@ public IEnumerable<ITagSpan<InlineCommentTag>> GetTags(NormalizedSnapshotSpanCol
121121
}
122122
}
123123

124-
IInlineAnnotationModel[] annotations = null;
124+
InlineAnnotationModel[] annotations = null;
125125
spanAnnotationsByLine?.TryGetValue(line, out annotations);
126126

127127
if (thread != null || annotations != null)

src/GitHub.InlineReviews/Tags/ShowInlineCommentTag.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ public ShowInlineCommentTag(IPullRequestSession session, int lineNumber, DiffCha
3030
/// <summary>
3131
/// Gets a list of models holding details of the annotations at the tagged line.
3232
/// </summary>
33-
public IReadOnlyList<IInlineAnnotationModel> Annotations { get; set; }
33+
public IReadOnlyList<InlineAnnotationModel> Annotations { get; set; }
3434
}
3535
}

test/GitHub.InlineReviews.UnitTests/Tags/InlineCommentTaggerTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,16 +501,16 @@ static IPullRequestSessionFile CreateSessionFile(bool withComments = true, bool
501501

502502
if (withAnnotations)
503503
{
504-
var annotation1 = Substitute.For<IInlineAnnotationModel>();
504+
var annotation1 = Substitute.For<InlineAnnotationModel>();
505505
annotation1.EndLine.Returns(11);
506506

507-
var annotation2 = Substitute.For<IInlineAnnotationModel>();
507+
var annotation2 = Substitute.For<InlineAnnotationModel>();
508508
annotation2.EndLine.Returns(21);
509509

510-
var annotation3 = Substitute.For<IInlineAnnotationModel>();
510+
var annotation3 = Substitute.For<InlineAnnotationModel>();
511511
annotation3.EndLine.Returns(21);
512512

513-
var annotations = new List<IInlineAnnotationModel> { annotation1, annotation2, annotation3 };
513+
var annotations = new List<InlineAnnotationModel> { annotation1, annotation2, annotation3 };
514514

515515
file.InlineAnnotations.Returns(annotations);
516516
}

0 commit comments

Comments
 (0)