Skip to content

Commit f5358c2

Browse files
committed
Add 'HiddenAttribute' to properties/methods of the stub types
1 parent 0449610 commit f5358c2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Polyfill/CommandPrediction.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#if LEGACY
22

3-
using System;
43
using System.Collections.Generic;
54
using System.Threading.Tasks;
65
using System.Management.Automation.Language;
@@ -15,16 +14,19 @@ public sealed class PredictionResult
1514
/// <summary>
1615
/// Gets the Id of the predictor.
1716
/// </summary>
17+
[HiddenAttribute]
1818
public Guid Id { get; }
1919

2020
/// <summary>
2121
/// Gets the name of the predictor.
2222
/// </summary>
23+
[HiddenAttribute]
2324
public string Name { get; }
2425

2526
/// <summary>
2627
/// Gets the suggestions.
2728
/// </summary>
29+
[HiddenAttribute]
2830
public IReadOnlyList<PredictiveSuggestion> Suggestions { get; }
2931

3032
internal PredictionResult(Guid id, string name, List<PredictiveSuggestion> suggestions)
@@ -43,17 +45,20 @@ public sealed class PredictiveSuggestion
4345
/// <summary>
4446
/// Gets the suggestion.
4547
/// </summary>
48+
[HiddenAttribute]
4649
public string SuggestionText { get; }
4750

4851
/// <summary>
4952
/// Gets the tooltip of the suggestion.
5053
/// </summary>
54+
[HiddenAttribute]
5155
public string ToolTip { get; }
5256

5357
/// <summary>
5458
/// Initializes a new instance of the <see cref="PredictiveSuggestion"/> class.
5559
/// </summary>
5660
/// <param name="suggestion">The predictive suggestion text.</param>
61+
[HiddenAttribute]
5762
public PredictiveSuggestion(string suggestion)
5863
: this(suggestion, toolTip: null)
5964
{
@@ -64,6 +69,7 @@ public PredictiveSuggestion(string suggestion)
6469
/// </summary>
6570
/// <param name="suggestion">The predictive suggestion text.</param>
6671
/// <param name="toolTip">The tooltip of the suggestion.</param>
72+
[HiddenAttribute]
6773
public PredictiveSuggestion(string suggestion, string toolTip)
6874
{
6975
if (string.IsNullOrEmpty(suggestion))
@@ -87,6 +93,7 @@ public static class CommandPrediction
8793
/// <param name="ast">The <see cref="Ast"/> object from parsing the current command line input.</param>
8894
/// <param name="astTokens">The <see cref="Token"/> objects from parsing the current command line input.</param>
8995
/// <returns>A list of <see cref="PredictionResult"/> objects.</returns>
96+
[HiddenAttribute]
9097
public static Task<List<PredictionResult>> PredictInput(Ast ast, Token[] astTokens)
9198
{
9299
return null;
@@ -99,6 +106,7 @@ public static Task<List<PredictionResult>> PredictInput(Ast ast, Token[] astToke
99106
/// <param name="astTokens">The <see cref="Token"/> objects from parsing the current command line input.</param>
100107
/// <param name="millisecondsTimeout">The milliseconds to timeout.</param>
101108
/// <returns>A list of <see cref="PredictionResult"/> objects.</returns>
109+
[HiddenAttribute]
102110
public static Task<List<PredictionResult>> PredictInput(Ast ast, Token[] astTokens, int millisecondsTimeout)
103111
{
104112
return null;
@@ -108,6 +116,7 @@ public static Task<List<PredictionResult>> PredictInput(Ast ast, Token[] astToke
108116
/// Allow registered predictors to do early processing when a command line is accepted.
109117
/// </summary>
110118
/// <param name="history">History command lines provided as references for prediction.</param>
119+
[HiddenAttribute]
111120
public static void OnCommandLineAccepted(IReadOnlyList<string> history)
112121
{
113122
}
@@ -117,6 +126,7 @@ public static void OnCommandLineAccepted(IReadOnlyList<string> history)
117126
/// </summary>
118127
/// <param name="predictorId">The identifier of the predictor whose prediction result was accepted.</param>
119128
/// <param name="suggestionText">The accepted suggestion text.</param>
129+
[HiddenAttribute]
120130
public static void OnSuggestionAccepted(Guid predictorId, string suggestionText)
121131
{
122132
}

0 commit comments

Comments
 (0)