private object CreateInstance(RegistrationModel model, object[] arguments = null) { object returnedObj = null; Type typeToCreate = model.ObjectType; if (model.RegType == REG_TYPE.TRANSIENT) { returnedObj = AddTransientInstance.GetInstance().GetNewObject(typeToCreate, arguments); } else if (model.RegType == REG_TYPE.SINGLETON) { returnedObj = AddSingletonInstance.GetInstance().GetSingleton(typeToCreate, arguments); } return(returnedObj); }
static AddSingletonInstance() { instance = new AddSingletonInstance(); }