I think your problem is that IoC.Get<T>
is a static
method that returns an instance of type T
, in other words it is not a Func<T>
so to solve the problem you will have to modify your code like so:
private static readonly Lazy<IShell> shellLazy = new Lazy<IShell>(() => IoC.Get<IShell>(), true);
That is the reason for the compilation error that there is no constructor on type Lazy<>
accepting an IShell
instance.