-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
I'm migrating an older projects to .NET Standard. Previously I used ImpromputInterface:
Impromptu.InvokeGet(type.WithStaticContext(), "Context");Where the type is for example a nested private class within a test fixture:
public class ContextResolverTests
{
private class GenericType
{
private static string Context => "Text";
}
}Now I want to target netstandard1.5 so I replaced the original implementation with Dynamitey
var staticContext = InvokeContext.CreateStatic;
return Dynamic.InvokeGet(staticContext(type), "Context");And it stopped working!
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException :
'JsonLD.Entities.Tests.ContextResolverTests.GenericType' does not contain a definition for 'Context'
Apparently the class has to be public and cannot be nested. Here's my repository stripped down. I removed everything, all unnecessary code and replaced paket with plain nuget references, to no avail.
But the real kicker is that I tried to reproduce this from scratch and was completely unable to get the same effect. What is going on?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels