private static object Resolve(Type type) { object obj; if (!DI.m_instancesMap.TryGetValue(type, out obj)) { return(DI.AddCreate(type)); } if (DI.m_placeholder == obj) { throw new Exception("Cyclic dependency " + type); } return(obj); }