Thanks Marc for the suggestion, I had started looking into this.
NHibernate already does some dynamic code generation for its proxifying mechanism, so we already have the logic for this in the code base. Still this looks a bit overkill to me. Worst, there is currently no test for this session context. So I am quite reluctant to do such non-trivial changes, especially if it cannot be tested easily. (I have almost no experience with WCF.) Le mardi 7 août 2018 11:29:53 UTC+2, Marc Gerritsen a écrit : > > Hi Matt > > You clould try to make the WcfStateExtension class a generated one. That > way you clould use reflection and don't have a breaking change. > > Kind regards, > Marc > > Op maandag 6 augustus 2018 07:54:34 UTC+2 schreef Matt Zinkevicius: >> >> I don't think using reflection is an option in this case, since the code >> creates a class inheriting from a WCF interface. >> >> The only options I can think of is >> 1) Separating this context class out into its own project and NuGet >> package >> 2) Don't compile this context class in .NET Core 2.0+ builds, where the >> use of WCF is extremely uncommon >> >> On Saturday, August 4, 2018 at 11:17:28 AM UTC-6, Frédéric Delaporte >> wrote: >>> >>> This is required for the WCF session context >>> <https://github.com/nhibernate/nhibernate-core/blob/5.1.3/src/NHibernate/Context/WcfOperationSessionContext.cs>. >>> >>> A reflection based solution could be put in place instead, like the one for >>> the Web session context >>> <https://github.com/nhibernate/nhibernate-core/blob/5.1.3/src/NHibernate/Context/WebSessionContext.cs>. >>> >>> (The reflection is done here >>> <https://github.com/nhibernate/nhibernate-core/blob/5.1.3/src/NHibernate/Context/ReflectiveHttpContext.cs> >>> .) >>> >>> Le samedi 4 août 2018 01:44:02 UTC+2, Matt Zinkevicius a écrit : >>>> >>>> Why does NH requires a package reference >>>> to System.ServiceModel.Primitives? This is a WCF library that bring in all >>>> kinds of dependencies (including an unmanaged one). >>>> >>>> Would it be possible to extract whatever code needs WCF support out of >>>> the main NH library and into a separate library/package? >>>> >>>> Thanks, >>>> Matt >>>> >>> -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-development+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.