Skip to content

Commit 4c1538b

Browse files
committed
Restore public ScriptRegion Create(...) method
1 parent 6d2d5a7 commit 4c1538b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/PowerShellEditorServices/Services/TextDocument/ScriptRegion.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class ScriptRegion : IScriptExtent
1616
{
1717
internal TextEdit ToTextEdit() => new() { NewText = Text, Range = ToRange() };
1818

19-
public Range ToRange()
19+
internal Range ToRange()
2020
{
2121
return new Range
2222
{
@@ -73,7 +73,7 @@ public ScriptRegion(
7373
EndOffset = endOffset;
7474
}
7575

76-
public ScriptRegion (IScriptExtent scriptExtent)
76+
public ScriptRegion(IScriptExtent scriptExtent)
7777
{
7878
File = scriptExtent.File;
7979

@@ -95,6 +95,11 @@ public ScriptRegion (IScriptExtent scriptExtent)
9595
EndOffset = scriptExtent.EndOffset;
9696
}
9797

98+
/// <summary>
99+
/// NOTE: While unused, we kept this as it was previously exposed on a public class.
100+
/// </summary>
101+
public static ScriptRegion Create(IScriptExtent scriptExtent) => new(scriptExtent);
102+
98103
#endregion
99104

100105
#region Properties

0 commit comments

Comments
 (0)