public static ItemViewModel Create(string internalName, int index) { ItemViewModel item = null; if (internalName.StartsWith("{")) { var info = new ApplicationApi.ApplicationInfo(internalName); if (info.IsValid()) { item = new ItemViewModel(info); } } else { item = SpecialItemRepository.GetByName(internalName); if (item == null) item = new SpecialItemViewModel(internalName, index); } return item; }
public static ItemViewModel Create(string internalName, int index) { ItemViewModel item = null; if (internalName.StartsWith("{")) { var info = new ApplicationApi.ApplicationInfo(internalName); if (info.IsValid()) { item = new ItemViewModel(info); } } else { item = SpecialItemRepository.GetByName(internalName); if (item == null) { item = new SpecialItemViewModel(internalName, index); } } return(item); }