public static NO_Repository GetRepository(this NetDataReader reader) { byte itemNum = reader.GetByte(); var itemList = new List <NO_Item> (); for (int i = 0; i < itemNum; i++) { itemList.Add(reader.GetItem()); } byte equipNum = reader.GetByte(); var equipList = new List <NO_EquipmentItemInfo> (); for (int i = 0; i < equipNum; i++) { equipList.Add(reader.GetEquipmentItemInfo()); } return(new NO_Repository(itemList, equipList)); }