Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8fe2bcc

Browse files
authored
Merge pull request #1361 from calumgrant/cs/roslyn-3.1
C#: Update to Roslyn 3.1
2 parents 94e3c67 + fcfb7b2 commit 8fe2bcc

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,9 @@ public static void ExtractModifiers(Context cx, IEntity key, ISymbol symbol)
139139

140140
if (nt.TypeKind == TypeKind.Struct)
141141
{
142-
// Sadly, these properties are internal so cannot be accessed directly.
143-
// This seems to be a deficiency in the model.
144-
var readonlyProperty = nt.GetType().GetProperty("IsReadOnly", BindingFlags.NonPublic | BindingFlags.Instance);
145-
146-
bool isReadOnly = (bool)readonlyProperty.GetValue(nt);
147-
bool isByRefLikeType = nt.IsRefLikeType;
148-
149-
if (isReadOnly)
142+
if (nt.IsReadOnly)
150143
HasModifier(cx, key, "readonly");
151-
if (isByRefLikeType)
144+
if (nt.IsRefLikeType)
152145
HasModifier(cx, key, "ref");
153146
}
154147
}

csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.0.0" />
22+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.1.0" />
2323
</ItemGroup>
2424

2525
</Project>

csharp/extractor/Semmle.Extraction/Semmle.Extraction.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.0.0" />
15+
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.1.0" />
1616
<PackageReference Include="GitInfo" Version="2.0.18" />
1717
</ItemGroup>
1818

0 commit comments

Comments
 (0)