1

It seems that Mono on iOS does not support JIT compilation, which seems to be used by at least StructureMap, Ninject, and Simple Injector. It can be turned off with reflection replacing it in Ninject but that doesn't seem to be the case with its extensions, at least the interception one anyway. Are there any out there that do not use JIT compilation but have interception?

Steven
  • 166,672
  • 24
  • 332
  • 435
fordeka
  • 979
  • 2
  • 7
  • 22
  • Possible duplicate: http://stackoverflow.com/questions/2619564/ioc-library-compatible-with-monotouch – Hans Passant Aug 17 '12 at 13:48
  • "JIT" refers to an action done by the CLR, by a component called the "jitter". Technically no IoC does JIT compilation. They might do run-time compilation; but that's different. – Peter Ritchie Aug 17 '12 at 15:59
  • "It seems that Mono on iOS does not support JIT compilation" Neither does Windows 8 Metro. – Steven Aug 17 '12 at 18:34
  • @Peter the OP is basically talking about the use of Reflection.Emit. Dynamic code generation. – Steven Aug 20 '12 at 07:00

2 Answers2

1

You can with Griffin.Container. But the default interception package uses castle proxy. So you have to add the feature by yourself.

The interception features is implemented using decorators.

Implement the IInstanceDecorator class and add your implementation using container.AddDecorator().

jgauffin
  • 99,844
  • 45
  • 235
  • 372
0

Seen these?

https://github.com/grumpydev/TinyIoC

http://ioc.codeplex.com/

OpenNETCF.IoC (second link) has Mono listed as being supported.

timothyclifford
  • 6,799
  • 7
  • 57
  • 85
  • I looked at those briefly but dismissed them after I couldn't find interception as a documented feature- I will take a harder look at them if you say they support it though. – fordeka Aug 17 '12 at 13:52
  • The second link definitely lists MonoTouch as being supported – timothyclifford Aug 18 '12 at 03:04
  • 1
    @Ford tinyioc works fine on monotouch but currently doesn't support interception, it *is* however the next feature I intend to implement. – Steven Robbins Aug 21 '12 at 13:59
  • Unfortunately, I have to use Mono 2.6, not MonoTouch, which does not support JIT stuff period. A drawback of using Unity3d for iOS. – fordeka Aug 28 '12 at 00:25