public void LightInject() { var container = new LightInject.ServiceContainer(); foreach (var type in _types) { container.Register(type, type); } int length = 0; if (Scenario == ResolveScenario.ResolveOne) { length = 1; } else if (Scenario == ResolveScenario.ResolveHalf) { length = _types.Length / 2; } else if (Scenario == ResolveScenario.ResolveAll) { length = _types.Length; } for (var i = 0; i < length; i++) { container.GetInstance(_types[i]); } container.Dispose(); }
public void Dispose() { cntr.Dispose(); }