public Func <T> Create(SimpleContainer container) { return(() => (T)container.GetInstance(typeof(T), null)); }
/// <summary> /// Requests an instance. /// </summary> /// <typeparam name="TService">The type of the service.</typeparam> /// <param name="container">The container.</param> /// <param name="key">The key.</param> /// <returns>The instance.</returns> public static TService GetInstance <TService>(this SimpleContainer container, string key = null) { return((TService)container.GetInstance(typeof(TService), key)); }