mgravell / fast-member

Automatically exported from code.google.com/p/fast-member
Apache License 2.0
1.02k stars 137 forks source link

Unable to use TypeAccessor with IL Generated type. #59

Open guy-lud opened 6 years ago

guy-lud commented 6 years ago

Hi Marc,

I have a Lib named SimpleConfig which is like IOptions. I thought of using FastMemeber to check performance issues. To make a long story short i am creating a Type from an interface and when trying to use FastMemeber on a type from a dynamic assembly i get not supported exception, when trying to use it on the interface type when inheritance takes place i get outOfRangeException,

Can we use a flat hierarchy ?

mgravell commented 6 years ago

Do you perhaps have a minimal repro so we can be sure we're talking about the same scenario?

On Wed, 6 Jun 2018, 22:25 GuyL, notifications@github.com wrote:

Hi Marc,

I have a Lib named SimpleConfig which is like IOptions. I thought of using FastMemeber to check performance issues. To make a long story short i am creating a Type from an interface and when trying to use FastMemeber on a type from a dynamic assembly i get not supported exception, when trying to use it on the interface type when inheritance takes place i get outOfRangeException,

Can we use a flat hierarchy ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mgravell/fast-member/issues/59, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsO6Vlp0h2SX12isI4w9S2UqvfhePks5t6EizgaJpZM4UdZL4 .

guy-lud commented 6 years ago

Sure, I'll create a repo tonight (my night) and i will post it asap

guy-lud commented 6 years ago

Hi Marc,

I've created a branch with a demo of the problem, please take a look at this. The Test name is Marc_Demo

guy-lud commented 6 years ago

Hi @mgravell,

Did you have the time to look at it please ?

mgravell commented 6 years ago

Sorry, I'll try to look this weekend. Lots of plates to keep spinning.

On Sun, 17 Jun 2018, 09:26 GuyL, notifications@github.com wrote:

Hi @mgravell https://github.com/mgravell,

Did you have the time to look at it please ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mgravell/fast-member/issues/59#issuecomment-397863109, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDsOKjodsLQ45bUjD8hWh28NDMiK0tks5t9hKrgaJpZM4UdZL4 .

guy-lud commented 6 years ago

@mgravell thanks for replying :)

tippmar commented 5 years ago

This sounds pretty similar to the issues I found when working with interfaces. I've forked the fast-member repo and implemented a fix for the issue - you might take a look and see if it helps you or not: https://github.com/tippmar/fast-member -- I've also created a PR to this but it hasn't been merged yet.

guy-lud commented 5 years ago

@tippmar, I'll take a look. Thanks