From f7737ca31ed480571b7940bd77ef575051aeded7 Mon Sep 17 00:00:00 2001 From: jbtule Date: Fri, 3 Nov 2023 16:21:38 -0500 Subject: [PATCH] Fallback to get type arguments --- .../DynamicObjects/ExtensionToInstanceProxy.cs | 17 ++++++++++++++++- Version.props | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs b/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs index 2995c25..a0097f5 100644 --- a/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs +++ b/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs @@ -293,7 +293,22 @@ public override bool TryInvokeMember(System.Dynamic.InvokeMemberBinder binder, o }catch(RuntimeBinderException) { - types = null; + try + { + IList typeList = Dynamic.InvokeGet(binder, + "TypeArguments"); + if (typeList != null) + { + + types = typeList.ToArray(); + + } + + } + catch (RuntimeBinderException) + { + types = null; + } } var name=InvokeMemberName.Create; diff --git a/Version.props b/Version.props index 302ecdd..6d87896 100644 --- a/Version.props +++ b/Version.props @@ -1,5 +1,5 @@ - 3.0.1 + 3.0.2 \ No newline at end of file