Skip to content

Commit 9d835a0

Browse files
authored
Delete unused method and linker suppression (#567)
1 parent 55bda78 commit 9d835a0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ internal sealed partial class AIFunctionMcpServerTool : McpServerTool
7070
options);
7171
}
7272

73-
// TODO: Fix the need for this suppression.
74-
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2111:ReflectionToDynamicallyAccessedMembers",
75-
Justification = "AIFunctionFactory ensures that the Type passed to AIFunctionFactoryOptions.CreateInstance has public constructors preserved")]
76-
internal static Func<Type, AIFunctionArguments, object> GetCreateInstanceFunc() =>
77-
static ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] type, args) => args.Services is { } services ?
78-
ActivatorUtilities.CreateInstance(services, type) :
79-
Activator.CreateInstance(type)!;
80-
8173
private static AIFunctionFactoryOptions CreateAIFunctionFactoryOptions(
8274
MethodInfo method, McpServerToolCreateOptions? options) =>
8375
new()

0 commit comments

Comments
 (0)