public void MapInfo(Type type, InjectSetting setting) { if (!_typeCache.ContainsKey(type)) { _typeCache.Add(type, setting); } }
public void Map2(Type bind, Lifetime scope) { if (!_typeCache.ContainsKey(bind)) { var val = _typeCache[bind]; if (val == null) { val = new InjectSetting { Bind = bind }; } val.Scope = scope; } }
public void Map1(Type bind, Type to) { if (_typeCache.ContainsKey(bind)) { var val = _typeCache[bind]; if (val == null) { val = new InjectSetting { Bind = bind, Scope = Lifetime.Singleton }; } val.To = to; } }