Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 1ed4934

Browse files
committed
Merge pull request #364 from fhurta/master
Fixed to build as SL5 project
2 parents 5f3aee3 + 9b0c9d2 commit 1ed4934

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/ServiceStack.Text/Common/WriteType.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public static void WriteProperties(TextWriter writer, object value)
317317
{
318318
var len = PropertyWriters.Length;
319319
var exclude = JsConfig.ExcludePropertyReferences ?? new string[0];
320-
exclude = Array.ConvertAll(exclude, x => x.ToUpper());
320+
ConvertToUpper(exclude);
321321
for (int index = 0; index < len; index++)
322322
{
323323
var propertyWriter = PropertyWriters[index];
@@ -412,5 +412,18 @@ public static void WriteQueryString(TextWriter writer, object value)
412412
JsState.QueryStringMode = false;
413413
}
414414
}
415+
416+
/// <summary>
417+
/// Converts all string values in <c>strArray</c> to uppercase
418+
/// </summary>
419+
/// <param name="strArray"></param>
420+
private static void ConvertToUpper(string[] strArray)
421+
{
422+
for (var i = 0; i < strArray.Length; ++i)
423+
{
424+
if (strArray[i] != null)
425+
strArray[i] = strArray[i].ToUpper();
426+
}
427+
}
415428
}
416429
}

0 commit comments

Comments
 (0)