Skip to content

Commit fd04c34

Browse files
Mark some methods internal
Co-authored-by: Patrick Meinecke <[email protected]>
1 parent 6d8b0ba commit fd04c34

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/PowerShellEditorServices/Services/Symbols/SymbolsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public async Task<IEnumerable<SymbolReference>> GetDefinitionOfSymbolAsync(
293293
{
294294
List<SymbolReference> declarations = new();
295295
declarations.AddRange(scriptFile.References.TryGetReferences(symbol).Where(i => i.IsDeclaration));
296-
if (declarations.Any())
296+
if (declarations.Count > 0)
297297
{
298298
_logger.LogDebug($"Found possible declaration in same file ${declarations}");
299299
return declarations;

src/PowerShellEditorServices/Services/TextDocument/ScriptRegion.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.PowerShell.EditorServices.Services.TextDocument
1414
/// </summary>
1515
public sealed class ScriptRegion : IScriptExtent
1616
{
17-
public TextEdit ToTextEdit() => new() { NewText = Text, Range = ToRange() };
17+
internal TextEdit ToTextEdit() => new() { NewText = Text, Range = ToRange() };
1818

1919
public Range ToRange()
2020
{
@@ -34,7 +34,7 @@ public Range ToRange()
3434
}
3535

3636
// Same as PowerShell's EmptyScriptExtent
37-
public bool IsEmpty()
37+
internal bool IsEmpty()
3838
{
3939
return StartLineNumber == 0 && StartColumnNumber == 0
4040
&& EndLineNumber == 0 && EndColumnNumber == 0
@@ -43,7 +43,7 @@ public bool IsEmpty()
4343
}
4444

4545
// Do not use PowerShell's ContainsLineAndColumn, it's nonsense.
46-
public bool ContainsPosition(int line, int column)
46+
internal bool ContainsPosition(int line, int column)
4747
{
4848
return StartLineNumber <= line && line <= EndLineNumber
4949
&& StartColumnNumber <= column && column <= EndColumnNumber;

0 commit comments

Comments
 (0)