public static void AddDependencyWithInstance <I>(I objectInstance) { if (!dependencies.ContainsKey(typeof(I))) { dependencies.Add(typeof(I), new DependencyInfo() { Interface = typeof(I), ConcreteType = typeof(I), instance = objectInstance }); } else { dependencies[typeof(I)] = new DependencyInfo() { Interface = typeof(I), ConcreteType = typeof(I), instance = objectInstance } }; }
public static void AddDependency <I, C>(params object[] arguments) { if (!dependencies.ContainsKey(typeof(I))) { dependencies.Add(typeof(I), new DependencyInfo() { Interface = typeof(I), ConcreteType = typeof(C), args = arguments }); } else { dependencies[typeof(I)] = new DependencyInfo() { Interface = typeof(I), ConcreteType = typeof(C), args = arguments } }; }