Skip to content

Commit 6c9a0e9

Browse files
authored
Merge pull request #7 from red-gate/compatibility-analyzer
Enable compatibility analyzer, and fix issue in TinyJsonSer
2 parents 3a0f029 + ed8799b commit 6c9a0e9

File tree

7 files changed

+29
-3
lines changed

7 files changed

+29
-3
lines changed

Source/ULibs.FullExceptionString/ULibs.FullExceptionString.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
<Copyright>2018</Copyright>
66
</PropertyGroup>
77

8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
10+
</ItemGroup>
11+
812
</Project>

Source/ULibs.ShellEscape/ULibs.ShellEscape.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
<Copyright>2017</Copyright>
66
</PropertyGroup>
77

8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
10+
</ItemGroup>
11+
812
</Project>

Source/ULibs.TinyJsonDeser/ULibs.TinyJsonDeser.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
<Copyright>2018</Copyright>
66
</PropertyGroup>
77

8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
10+
</ItemGroup>
11+
812
</Project>

Source/ULibs.TinyJsonSer/JsonSerializer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private void SerializeDictionary(object target, Action<string> writeString, Acti
191191
var newIndentLevel = indentLevel + 1;
192192
var newIndent = GetIndent(newIndentLevel);
193193
bool isFirstElement = true;
194-
foreach (DictionaryEntry entry in dictionary)
194+
foreach (var key in dictionary.Keys)
195195
{
196196
if (isFirstElement)
197197
{
@@ -203,9 +203,9 @@ private void SerializeDictionary(object target, Action<string> writeString, Acti
203203
}
204204

205205
writeString(newIndent);
206-
SerializeString(entry.Key.ToString(), writeString, writeChar);
206+
SerializeString(key.ToString(), writeString, writeChar);
207207
writeString(_keyValueSeparator);
208-
Serialize(entry.Value, writeString, writeChar, newIndentLevel);
208+
Serialize(dictionary[key], writeString, writeChar, newIndentLevel);
209209
}
210210

211211
writeString(GetIndent(indentLevel));

Source/ULibs.TinyJsonSer/RELEASENOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# ULibs.TinyJsonSer release notes
22

3+
## 1.0.2
4+
5+
### Improvements
6+
7+
- Removed use of `DictionaryEntry` type, to improve cross-platform compatibility.
8+
39
## 1.0.1
410

511
### Improvements

Source/ULibs.TinyJsonSer/ULibs.TinyJsonSer.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
<Copyright>2016</Copyright>
66
</PropertyGroup>
77

8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
10+
</ItemGroup>
11+
812
</Project>

Source/ULibs.UlibsProjectTemplate/ULibs.UlibsProjectTemplate.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
<Copyright>2017</Copyright>
66
</PropertyGroup>
77

8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
10+
</ItemGroup>
11+
812
</Project>

0 commit comments

Comments
 (0)