Skip to content

Commit

Permalink
Merge pull request #148 from Dmitry-Me/getRidOfUnneededDynamic
Browse files Browse the repository at this point in the history
Get rid of unneeded dynamic
  • Loading branch information
Dmitry-Me committed Feb 20, 2016
2 parents 58bb151 + 42f37e4 commit b41e68a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CPPCheckPlugin/CPPCheckPluginPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ private static bool isCppFile(dynamic file)
// Using Reflection to get to the interface and access the property directly instead.
Type fileObjectType = file.GetType();
var vcFileInterface = fileObjectType.GetInterface("Microsoft.VisualStudio.VCProjectEngine.VCFile");
var fileTypeValue = vcFileInterface.GetProperty("FileType").GetValue(file);
var fileTypeValue = vcFileInterface.GetProperty("FileType").GetValue((object)file);
Type fileTypeEnumType = fileTypeValue.GetType();
Debug.Assert(fileTypeEnumType.FullName == "Microsoft.VisualStudio.VCProjectEngine.eFileType");
var fileTypeEnumValue = Enum.GetName(fileTypeEnumType, fileTypeValue);
Expand Down

0 comments on commit b41e68a

Please sign in to comment.