From 7f74ad437564eb0322d0425bd1ca184abd5324c7 Mon Sep 17 00:00:00 2001 From: ivotops Date: Mon, 9 Mar 2026 15:57:59 +0100 Subject: [PATCH] Fix for .NET10 - channelType does not inherit from Channel --- src/ServiceWire/ProxyFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceWire/ProxyFactory.cs b/src/ServiceWire/ProxyFactory.cs index dbba6ec..ada1e55 100644 --- a/src/ServiceWire/ProxyFactory.cs +++ b/src/ServiceWire/ProxyFactory.cs @@ -18,7 +18,7 @@ public static class ProxyFactory public static TInterface CreateProxy(Type channelType, Type ctorArgType, object channelCtorValue, ISerializer serializer, ICompressor compressor, ILog logger, IStats stats) where TInterface : class { - if (!channelType.InheritsFrom(typeof(Channel))) throw new ArgumentException("channelType does not inherit from Channel"); + if (!typeof(Channel).IsAssignableFrom(channelType)) throw new ArgumentException("channelType does not inherit from Channel"); Type interfaceType = typeof(TInterface); //derive unique key for this dynamic assembly by interface, channel and ctor type names