Skip to content

Commit 68014a6

Browse files
committed
No hard-coded windows-style new line symbols
1 parent 77f27b9 commit 68014a6

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

Orm/Xtensive.Orm/Core/Exceptions/AggregateException.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@ public List<Exception> GetFlatExceptions()
6060
public override string ToString()
6161
{
6262
StringBuilder sb = new StringBuilder(64);
63-
sb.Append(base.ToString());
64-
sb.AppendFormat("\r\n{0}:", Strings.OriginalExceptions);
63+
sb.Append(base.ToString())
64+
.AppendLine()
65+
.AppendFormat("{0}:", Strings.OriginalExceptions);
6566
int i = 1;
6667
foreach (Exception exception in exceptions)
67-
sb.AppendFormat("\r\n{0}: {1}", i++, exception);
68+
sb.AppendLine().AppendFormat("\r\n{0}: {1}", i++, exception);
6869
return sb.ToString();
6970
}
7071

Orm/Xtensive.Orm/Orm/Operation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public override string ToString()
139139
private string FormatIdentifiedEntities()
140140
{
141141
// Shouldn't be moved to resources
142-
return " Identified entities:\r\n" + (
142+
return " Identified entities:" + Environment.NewLine + (
143143
from pair in IdentifiedEntities
144144
orderby pair.Key
145145
select string.Format(" {0}: {1}", pair.Key, pair.Value)
@@ -150,7 +150,7 @@ select string.Format(" {0}: {1}", pair.Key, pair.Value)
150150
private string FormatOperations(string title, IEnumerable<IOperation> operations)
151151
{
152152
// Shouldn't be moved to resources
153-
return string.Format(" {0}:\r\n", title) +
153+
return string.Format(" {0}:", title) + Environment.NewLine +
154154
operations.ToDelimitedString(Environment.NewLine).ToString().Indent(4);
155155
}
156156

Orm/Xtensive.Orm/Orm/OperationLog.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public object Replay(object target)
111111
/// <inheritdoc/>
112112
public override string ToString()
113113
{
114-
var sb = new StringBuilder(string.Format("{0}:\r\n", Strings.Operations));
114+
var sb = new StringBuilder(string.Format("{0}:", Strings.Operations));
115+
_ = sb.AppendLine();
115116
foreach (var o in operations)
116117
sb.AppendLine(o.ToString().Indent(2));
117118
return sb.ToString().Trim();

Orm/Xtensive.Orm/Orm/Operations/KeySetOperation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public abstract class KeySetOperation : Operation,
2828
public override string Description {
2929
get
3030
{
31-
return string.Format("{0}:\r\n{1}", Title, Keys.ToDelimitedString("\r\n").Indent(2));
31+
return $"{Title}:{Environment.NewLine}{Keys.ToDelimitedString(Environment.NewLine).Indent(2)}";
3232
}
3333
}
3434

Orm/Xtensive.Orm/Orm/Upgrade/SchemaComparisonResult.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Xtensive.Modelling.Comparison;
1313
using Xtensive.Modelling.Comparison.Hints;
1414
using System.Linq;
15+
using System;
1516

1617
namespace Xtensive.Orm.Upgrade
1718
{
@@ -72,7 +73,7 @@ public override string ToString()
7273
HasUnsafeActions.ToString().ToLower(),
7374
HasColumnTypeChanges.ToString().ToLower(),
7475
IsCompatibleInLegacyMode.HasValue ? IsCompatibleInLegacyMode.Value.ToString() : Strings.Unknown,
75-
UnsafeActions.Any() ? UnsafeActions.ToDelimitedString("\r\n").Indent(2) : string.Empty,
76+
UnsafeActions.Any() ? UnsafeActions.ToDelimitedString(Environment.NewLine).Indent(2) : string.Empty,
7677
Hints!=null ? Hints.ToString().Indent(2) : string.Empty,
7778
Difference!=null ? Difference.ToString().Indent(2) : string.Empty);
7879
}

Orm/Xtensive.Orm/Sql/Compiler/SqlTranslator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public abstract class SqlTranslator : SqlDriverBound
2525
public NumberFormatInfo FloatNumberFormat { get; private set; }
2626
public NumberFormatInfo DoubleNumberFormat { get; private set; }
2727

28-
public virtual string NewLine { get { return "\r\n"; } }
28+
public virtual string NewLine { get { return Environment.NewLine; } }
2929

3030
public virtual string OpeningParenthesis { get { return "("; } }
3131
public virtual string ClosingParenthesis { get { return ")"; } }

0 commit comments

Comments
 (0)