Skip to content

Commit e3d55d0

Browse files
authored
fix: ToLower/ToUpper to ToLowerInvariant/ToUpperInvariant (#921)
* fix: ToLower/ToUpper to ToLowerInvariant/ToUpperInvariant * keep extra spaces * remove automatic new line by GH * remove new line by GitHub editor * keep extra tab * keep extra space * keep extra spaces/tabs more * last extra space
1 parent 12647aa commit e3d55d0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Appium.Net/Appium/ScreenOrientationExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static class ScreenOrientationExtensions
2727
/// <param name="orientation"></param>
2828
/// <returns></returns>
2929
public static string JSONWireProtocolString(this ScreenOrientation orientation) =>
30-
orientation.ToString().ToUpper();
30+
orientation.ToString().ToUpperInvariant();
3131

3232
/// <summary>
3333
/// Converts the string to a screen orientation if possible, else throws ArgumentOutOfRangeException

src/Appium.Net/Appium/Service/Options/OptionCollector.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private string ParseCapabilitiesIfWindows()
107107
{
108108
if (typeof(bool).IsAssignableFrom(value.GetType()))
109109
{
110-
value = Convert.ToString(value).ToLower();
110+
value = Convert.ToString(value).ToLowerInvariant();
111111
}
112112
}
113113

@@ -153,7 +153,7 @@ private string ParseCapabilitiesIfUNIX()
153153
{
154154
if (typeof(bool).IsAssignableFrom(value.GetType()))
155155
{
156-
value = Convert.ToString(value).ToLower();
156+
value = Convert.ToString(value).ToLowerInvariant();
157157
}
158158
}
159159

src/Appium.Net/Appium/iOS/IOSStartScreenRecordingOptions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public enum VideoType
2424
/// <returns>self instance for chaining.</returns>
2525
public IOSStartScreenRecordingOptions WithVideoType(VideoType videoType)
2626
{
27-
Parameters["videoType"] = videoType.ToString().ToLower();
27+
Parameters["videoType"] = videoType.ToString().ToLowerInvariant();
2828
return this;
2929
}
3030

@@ -54,7 +54,7 @@ public enum VideoQuality
5454
/// <returns></returns>
5555
public IOSStartScreenRecordingOptions WithVideoQuality(VideoQuality videoQuality)
5656
{
57-
Parameters["videoQuality"] = videoQuality.ToString().ToLower();
57+
Parameters["videoQuality"] = videoQuality.ToString().ToLowerInvariant();
5858
return this;
5959
}
6060

test/integration/helpers/Env.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private static void Init()
4949

5050
private static bool IsTrue(object val)
5151
{
52-
val = val?.ToString().ToLower().Trim();
52+
val = val?.ToString().ToLowerInvariant().Trim();
5353
return val.Equals("true") || val.Equals("1");
5454
}
5555

0 commit comments

Comments
 (0)