grumpydev / TinyIoC

An easy to use, hassle free, Inversion of Control Container for small projects, libraries and beginners alike.
MIT License
830 stars 235 forks source link

Does not compile under WinRT #12

Open DamianReeves opened 13 years ago

DamianReeves commented 13 years ago

I know this is a bleeding edge issue, but I wanted to use IoC in C# under WinRT, and your project came to mind as the perfect simple way for me to do this. I tried and failed because WinRT's reflection namespace does not seem to use BindingFlags in some of the GetMethod calls. It would be great if you could get this working, it might make you the first IoC that works under WinRT.

grumpydev commented 13 years ago

Lol, I have the Win8 preview on my laptop, I'll take a look :-)

grumpydev commented 13 years ago

@DamianReeves ok, it builds .. there's a couple of things that aren't working (I've added a platform tests WinRT project so you can see), but the basics appear to work.. have a play and let me know what you think:

https://github.com/grumpydev/TinyIoC/tree/WinRT

DamianReeves commented 13 years ago

Sorry for the delay in getting back to you. I'll take a look at this tonight and let you know. (BTW: I closed the issue by accident becaus e the comment and close button was closer than comment... don't read anything into this being closed and then reopened)

grumpydev commented 13 years ago

@DamianReeves no worries, I do that all the time :-)

Grunt101 commented 9 years ago

Any idea of when this will be brought into the main branch? Would like to use TinyIoC it in a Universal App

grumpydev commented 9 years ago

There's a separate nuget for it, and the current version compiles as PCL which you can link to.

Grunt101 commented 9 years ago

Hmmm...do you mean that the current master branch is PCL compliant, as I have a PCL that targets Windows 8.1 & Windows Phone 8.1 and it doesn't seem to compile?

grumpydev commented 9 years ago

I can't recall if I needed any tweaks but I got it working in a PCL project recently, but I had to build it into its own assembly and reference it so that the shims were put in place for the new reflection API.

Grunt101 commented 9 years ago

I have been going through the code on the master branch and I see that you have a whole bunch of #if NETFX_CORE code blocks commented out. It seems that most of those comments would sort the issue out. Is there a reason why they all commented out?

grumpydev commented 9 years ago

Yes, you're meant to uncomment those to fit your platform :)