Skip to content

Commit 254a377

Browse files
committed
Remove formatting, the same will be done in another way
1 parent 7902e1d commit 254a377

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

dotnet/src/webdriver/BiDi/Modules/Script/StackFrame.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,4 @@
1919

2020
namespace OpenQA.Selenium.BiDi.Modules.Script;
2121

22-
public record StackFrame(long LineNumber, long ColumnNumber, string Url, string FunctionName)
23-
{
24-
public string FormatStackFrame()
25-
{
26-
if (string.IsNullOrEmpty(FunctionName))
27-
{
28-
return $"({LineNumber},{ColumnNumber}) {Url}";
29-
}
30-
31-
return $"{FunctionName} ({LineNumber},{ColumnNumber}) {Url}";
32-
}
33-
}
22+
public record StackFrame(long LineNumber, long ColumnNumber, string Url, string FunctionName);

dotnet/src/webdriver/BiDi/Modules/Script/StackTrace.cs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,8 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using System;
2120
using System.Collections.Generic;
22-
using System.Linq;
2321

2422
namespace OpenQA.Selenium.BiDi.Modules.Script;
2523

26-
public record StackTrace(IReadOnlyList<StackFrame> CallFrames)
27-
{
28-
public string FormatStackTrace(int indent)
29-
{
30-
if (CallFrames.Count == 0)
31-
{
32-
return string.Empty;
33-
}
34-
35-
const string Preamble = "---> ";
36-
37-
string firstLineIndentString = Environment.NewLine + new string(' ', indent);
38-
string firstLine = firstLineIndentString + Preamble + CallFrames[0].FormatStackFrame();
39-
40-
string indentString = Environment.NewLine + new string(' ', indent + Preamble.Length);
41-
return firstLine + indentString + string.Join(indentString, CallFrames.Skip(1).Select(frame => frame.FormatStackFrame()));
42-
}
43-
}
24+
public record StackTrace(IReadOnlyList<StackFrame> CallFrames);

0 commit comments

Comments
 (0)