diff --git a/ICSharpCode.Decompiler/TypeSystem/MetadataLoader.cs b/ICSharpCode.Decompiler/TypeSystem/MetadataLoader.cs index bfafc7253..19ad8712b 100644 --- a/ICSharpCode.Decompiler/TypeSystem/MetadataLoader.cs +++ b/ICSharpCode.Decompiler/TypeSystem/MetadataLoader.cs @@ -291,7 +291,7 @@ namespace ICSharpCode.Decompiler.TypeSystem /// a type system type reference. /// Attributes associated with the Cecil type reference. /// This is used to support the 'dynamic' type. - public ITypeReference ReadTypeReference(EntityHandle type, CustomAttributeHandleCollection typeAttributes = default) + public ITypeReference ReadTypeReference(EntityHandle type, SRM.CustomAttributeHandleCollection typeAttributes = default(CustomAttributeHandleCollection)) { int typeIndex = 0; return CreateType(type, typeAttributes, ref typeIndex); @@ -1713,7 +1713,7 @@ namespace ICSharpCode.Decompiler.TypeSystem Metadata.IMetadataEntity result; lock (typeSystemTranslationTable) { if (!typeSystemTranslationTable.TryGetValue (typeSystemObject, out result)) - return default; + return default(T); } return (T)result; } diff --git a/ILSpy/Languages/CSharpLanguage.cs b/ILSpy/Languages/CSharpLanguage.cs index aabb0b92a..df224cb04 100644 --- a/ILSpy/Languages/CSharpLanguage.cs +++ b/ILSpy/Languages/CSharpLanguage.cs @@ -34,7 +34,6 @@ using ICSharpCode.Decompiler.CSharp.Transforms; using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.ILSpy.Options; using ICSharpCode.ILSpy.TreeNodes; -using ICSharpCode.Decompiler.CSharp.Transforms; namespace ICSharpCode.ILSpy { diff --git a/ILSpy/SearchStrategies.cs b/ILSpy/SearchStrategies.cs index 84a60d953..2b149b3bd 100644 --- a/ILSpy/SearchStrategies.cs +++ b/ILSpy/SearchStrategies.cs @@ -234,9 +234,9 @@ namespace ICSharpCode.ILSpy } } - protected override bool MatchName(IMemberDefinition m, Language language) + protected override bool MatchName(IMetadataEntity m, Language language) { - return m.MetadataToken.ToInt32() == searchTermToken; + return SRM.Ecma335.MetadataTokens.GetToken(m.Handle) == searchTermToken; } }