Skip to content

Commit 9a4a448

Browse files
authored
Merge pull request #708 from kevinvenclovas/main
2 parents 3de4348 + 23b19aa commit 9a4a448

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Source/FikaAmazonAPI/AmazonConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public AmazonConnection(AmazonCredential Credentials, string RefNumber = null, C
9292
{
9393
this.Authenticate(Credentials);
9494
this.RefNumber = RefNumber;
95-
Thread.CurrentThread.CurrentCulture = cultureInfo ?? CultureInfo.InvariantCulture;
95+
Thread.CurrentThread.CurrentCulture = cultureInfo ?? CultureInfo.CurrentCulture;
9696
}
9797

9898
private void Authenticate(AmazonCredential Credentials)

Source/FikaAmazonAPI/ReportGeneration/DataConverter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ public static class DateTimeFormat
3232
}
3333
public static decimal? GetDecimal(string str)
3434
{
35-
if (decimal.TryParse(str.Replace(",","."), NumberStyles.Any, new CultureInfo("en-US"), out decimal value))
35+
if (decimal.TryParse(str?.Replace(",","."), NumberStyles.Any, new CultureInfo("en-US"), out decimal value))
3636
{
3737
return value;
3838
}
3939
return null;
4040
}
4141
public static int? GetInt(string str)
4242
{
43-
if (int.TryParse(str.Replace(",", "."), NumberStyles.Integer, new CultureInfo("en-US"), out int value))
43+
if (int.TryParse(str?.Replace(",", "."), NumberStyles.Integer, new CultureInfo("en-US"), out int value))
4444
{
4545
return value;
4646
}
4747
return null;
4848
}
4949
public static double? GetDouble(string str)
5050
{
51-
if (double.TryParse(str.Replace(",", "."), NumberStyles.Any, new CultureInfo("en-US"), out double value))
51+
if (double.TryParse(str?.Replace(",", "."), NumberStyles.Any, new CultureInfo("en-US"), out double value))
5252
{
5353
return value;
5454
}

0 commit comments

Comments
 (0)