File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
src/PowerShellEditorServices/Services/DebugAdapter
test/PowerShellEditorServices.Test/Session Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ internal class DebugService
28
28
29
29
private const string PsesGlobalVariableNamePrefix = "__psEditorServices_" ;
30
30
private const string TemporaryScriptFileName = "Script Listing.ps1" ;
31
- private readonly BreakpointDetails [ ] s_emptyBreakpointDetailsArray = new BreakpointDetails [ 0 ] ;
32
31
33
32
private readonly ILogger logger ;
34
33
private readonly PowerShellContextService powerShellContext ;
@@ -150,7 +149,7 @@ public async Task<BreakpointDetails[]> SetLineBreakpointsAsync(
150
149
this . logger . LogTrace (
151
150
$ "Could not set breakpoints for local path '{ scriptPath } ' in a remote session.") ;
152
151
153
- return s_emptyBreakpointDetailsArray ;
152
+ return Array . Empty < BreakpointDetails > ( ) ;
154
153
}
155
154
156
155
string mappedPath =
@@ -167,7 +166,7 @@ public async Task<BreakpointDetails[]> SetLineBreakpointsAsync(
167
166
this . logger . LogTrace (
168
167
$ "Could not set breakpoint on temporary script listing path '{ scriptPath } '.") ;
169
168
170
- return s_emptyBreakpointDetailsArray ;
169
+ return Array . Empty < BreakpointDetails > ( ) ;
171
170
}
172
171
173
172
// Fix for issue #123 - file paths that contain wildcard chars [ and ] need to
@@ -216,7 +215,7 @@ await _breakpointService.RemoveBreakpointsAsync(
216
215
resultBreakpointDetails = ( await _breakpointService . SetCommandBreakpoints ( breakpoints ) . ConfigureAwait ( false ) ) . ToArray ( ) ;
217
216
}
218
217
219
- return resultBreakpointDetails ?? new CommandBreakpointDetails [ 0 ] ;
218
+ return resultBreakpointDetails ?? Array . Empty < CommandBreakpointDetails > ( ) ;
220
219
}
221
220
222
221
/// <summary>
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ internal static WorkspaceService FixturesWorkspace()
53
53
54
54
// These are the default values for the EnumeratePSFiles() method
55
55
// in Microsoft.PowerShell.EditorServices.Workspace class
56
- private static string [ ] s_defaultExcludeGlobs = new string [ 0 ] ;
56
+ private static string [ ] s_defaultExcludeGlobs = Array . Empty < string > ( ) ;
57
57
private static string [ ] s_defaultIncludeGlobs = new [ ] { "**/*" } ;
58
58
private static int s_defaultMaxDepth = 64 ;
59
59
private static bool s_defaultIgnoreReparsePoints = false ;
You can’t perform that action at this time.
0 commit comments