From e22851bd66cce8b050088549dbe561d9b53bb2c6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 28 Jul 2026 18:22:17 +0200 Subject: [PATCH] Remove the now-unused IMemberReference interface IdStringMemberReference was its only implementation and left with the ID string grammar parser; unlike the NRefactory-era type system, IMember does not extend IMemberReference here, so nothing in the library produces or consumes it anymore. Assisted-by: Claude:claude-fable-5:Claude Code --- ICSharpCode.Decompiler/TypeSystem/IMember.cs | 22 ------------------- .../TypeSystem/TypeSystemExtensions.cs | 2 -- 2 files changed, 24 deletions(-) diff --git a/ICSharpCode.Decompiler/TypeSystem/IMember.cs b/ICSharpCode.Decompiler/TypeSystem/IMember.cs index b37c60cb7..3bea3222e 100644 --- a/ICSharpCode.Decompiler/TypeSystem/IMember.cs +++ b/ICSharpCode.Decompiler/TypeSystem/IMember.cs @@ -22,28 +22,6 @@ using System.Collections.Generic; namespace ICSharpCode.Decompiler.TypeSystem { - public interface IMemberReference - { - /// - /// Gets the declaring type reference for the member. - /// - ITypeReference DeclaringTypeReference { get; } - - /// - /// Resolves the member. - /// - /// - /// Context to use for resolving this member reference. - /// Which kind of context is required depends on the which kind of member reference this is; - /// please consult the documentation of the method that was used to create this member reference, - /// or that of the class implementing this method. - /// - /// - /// Returns the resolved member, or null if the member could not be found. - /// - IMember? Resolve(ITypeResolveContext context); - } - /// /// Method/field/property/event. /// diff --git a/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs b/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs index 8d958ac73..b4a2f359a 100644 --- a/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs +++ b/ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs @@ -485,8 +485,6 @@ namespace ICSharpCode.Decompiler.TypeSystem return new ProjectedList(context, typeReferences, (c, t) => t.Resolve(c)); } - // There is intentionally no Resolve() overload for IList: the resulting IList would - // contains nulls when there are resolve errors. #endregion #region IAssembly.GetTypeDefinition()