public int CompareTo(object obj)
        {
            MarketplaceItem marketplaceItem = (MarketplaceItem)obj;
            int             num             = RequiredLevel.CompareTo(marketplaceItem.RequiredLevel);

            if (num == 0 && marketplaceItem != this && IsSpecialItem)
            {
                num = -1;
            }
            return(num);
        }
 private void onMembershipDataUpdated(MembershipData membershipData)
 {
     if (membershipData.IsMember && !isMember)
     {
         isMember = true;
         int count = marketplaceItems.Count;
         for (int i = 0; i < count; i++)
         {
             MarketplaceItem marketplaceItem = marketplaceItems[i].MarketplaceItem;
             marketplaceItem.checkLockedState();
             marketplaceItem.UpdateVisualStates();
         }
     }
 }
        private IEnumerator loadConfirmation(PrefabContentKey prefabKey, MarketplaceItem item)
        {
            AssetRequest <GameObject> request = Content.LoadAsync(prefabKey);

            yield return(request);

            GameObject newConfirmation = UnityEngine.Object.Instantiate(request.Asset, ConfirmationContainer, worldPositionStays: false);

            newConfirmation.GetComponent <MarketplaceConfirmation>().SetItem(item.ItemDefinition, item.ItemIcon.texture, this, (RectTransform)item.transform, ContentScrollRect.transform as RectTransform);
            if (confirmation != null)
            {
                HideConfirmation();
            }
            confirmation = newConfirmation;
        }
        private void onItemSelected(int itemIndex)
        {
            MarketplaceItem marketplaceItem = marketplaceItems[itemIndex].MarketplaceItem;

            if (marketplaceItem.IsMemberLocked)
            {
                Service.Get <GameStateController>().ShowAccountSystemMembership("Marketplace");
            }
            else if (marketplaceItem.IsLevelLocked)
            {
                if (popupController == null)
                {
                    InitPopupController();
                }
                MarketplaceItemData itemData = new MarketplaceItemData(marketplaceItem.ItemDefinition, marketplaceItem.RequiredLevel);
                popupController.ShowItemPopup(itemData, itemSprites[marketplaceItem.ItemDefinition.GetIconContentKey().Key.ToLower()], marketplaceItem.LockStates);
            }
            else
            {
                PrefabContentKey prefabKey = ((marketplaceItem.ItemDefinition.ExperienceType == PropDefinition.ConsumableExperience.PartyGameLobby) ? partyGameConfirmationPrefabKey : confirmationPrefabKey);
                CoroutineRunner.Start(loadConfirmation(prefabKey, marketplaceItem), this, "LoadMarketplaceConfirmation");
            }
        }