private void OnItemToMarketMsg(AppChangingItemsMessage message)
        {
            if (!IsCanMakeDMarketOperation(message))
            {
                return;
            }
            var item = GetInventory(message.ConnectionId).GetItem(message.WorldId);

            if (item == null)
            {
                var error = new Error();
                error.ErrorCode    = ErrorCode.AssetNotFound;
                error.ErrorMessage = string.Format("Cannot find item with id {0} for "
                                                   + "player {1}. Need reload game",
                                                   message.WorldId, Model.ConIdToUserName[message.ConnectionId]);
                OnItemOperationError(message, error);
                return;
            }

            var assetId = _dMarketConverter.GetAssetId(item.WorldId);
            var classId = _dMarketConverter.GetClassId(item.ItemType);

            DMarketApi.ToMarket(Model.MarketToken, assetId, classId,
                                (responce, request) =>
            {
                item.IsInMarket = true;
                OnAfterSuccesDMarketOperation(message);
            },
                                error =>
            {
                OnItemOperationError(message, error);
            });
        }
        public void Update(PlayerInventoryInfo inventory)
        {
            //TODO need optimization
            _items.Clear();

            foreach (PlayerItemInfo gameItem in inventory.Items)
            {
                if (!gameItem.IsInMarket && !inventory.IsEquipped(gameItem.WorldId))
                {
                    var newItem = new InGameItemInfo
                    {
                        Title   = _infoCatalog.GetInfo(gameItem.ItemType).Name,
                        Sprite  = _imageCatalog.GetInventoryItemSprite(gameItem.ItemType),
                        AssetId = _dMarketConverter.GetAssetId(gameItem.WorldId),
                        ClassId = _dMarketConverter.GetClassId(gameItem.ItemType)
                    };
                    _items.Add(newItem);
                }
            }
            ItemsChanged.SafeRaise();
        }