We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7f6488 commit 5ad1b4dCopy full SHA for 5ad1b4d
Src/SimpleS3.Core.Common/RegionConverter.cs
@@ -9,8 +9,11 @@ public class RegionConverter : IRegionConverter
9
private readonly Dictionary<int, IRegionInfo> _enumMap = new Dictionary<int, IRegionInfo>();
10
private readonly Dictionary<string, IRegionInfo> _stringMap = new Dictionary<string, IRegionInfo>(StringComparer.OrdinalIgnoreCase);
11
12
- public RegionConverter(IRegionData data)
+ public RegionConverter(IRegionData? data = null) //If we are not provided with region data, we don't do any mapping
13
{
14
+ if (data == null)
15
+ return;
16
+
17
foreach (IRegionInfo regionInfo in data.GetRegions())
18
19
int intVal = (int)Convert.ChangeType(regionInfo.EnumValue, typeof(int), NumberFormatInfo.InvariantInfo);
0 commit comments