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

Commit 237e40f

Browse files
committed
Add xmldoc comments for TextViewCommandDispatcher
1 parent 0974e48 commit 237e40f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/GitHub.VisualStudio/Views/GitHubPane/TextViewCommandDispatcher.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@
55

66
namespace GitHub.VisualStudio.Views.GitHubPane
77
{
8+
/// <summary>
9+
/// Used to filter commands send to <see cref="IVsTextView"/> dispatch them to a <see cref="Exec"/> event.
10+
/// </summary>
811
class TextViewCommandDispatcher : IOleCommandTarget, IDisposable
912
{
1013
readonly IVsTextView textView;
1114
readonly Guid commandGroup;
1215
readonly int commandId;
1316
readonly IOleCommandTarget next;
1417

18+
/// <summary>
19+
/// Add a command filter to <see cref="IVsTextView"/>.
20+
/// </summary>
21+
/// <param name="textView">The text view to filter commands from.</param>
22+
/// <param name="commandGroup">The group of the command to filter.</param>
23+
/// <param name="commandId">The ID of the command to filter.</param>
1524
public TextViewCommandDispatcher(IVsTextView textView, Guid commandGroup, int commandId)
1625
{
1726
this.textView = textView;
@@ -21,6 +30,9 @@ public TextViewCommandDispatcher(IVsTextView textView, Guid commandGroup, int co
2130
ErrorHandler.ThrowOnFailure(textView.AddCommandFilter(this, out next));
2231
}
2332

33+
/// <summary>
34+
/// Remove the command filter.
35+
/// </summary>
2436
public void Dispose()
2537
{
2638
ErrorHandler.ThrowOnFailure(textView.RemoveCommandFilter(this));
@@ -54,6 +66,9 @@ int IOleCommandTarget.QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] p
5466
return next?.QueryStatus(ref pguidCmdGroup, cCmds, prgCmds, pCmdText) ?? 0;
5567
}
5668

69+
/// <summary>
70+
/// Fired when a command of the filtered type is executed.
71+
/// </summary>
5772
public event EventHandler Exec;
5873
}
5974
}

0 commit comments

Comments
 (0)