public IInstance NewInstance(int id, int type) { IInstance instance = null; int finalId = GenId(id, type); IInstance temp = GetInstanceResource(finalId); if (null != temp) { instance = temp.Clone(); } return(instance); }