Exemplo n.º 1
0
    public GameInfo findGame(JsonSlotGamePromoListing promoGame)
    {
        var gameClub    = promoGame.ProductCode;
        var gameCode    = promoGame.HtmlGameId;
        var gameTitle   = promoGame.GameTitle;
        var matchedGame = new GameInfo();

        switch (gameClub)
        {
        case "slot":

            var handler = new GPIHandler(commonVariables.CurrentMemberSessionId);

            var gpiCategory = handler.Process();

            foreach (var category in gpiCategory)
            {
                matchedGame = category.New.Find(x => x.Id == gameCode);
                if (matchedGame != null)
                {
                    break;
                }
                matchedGame = category.Current.Find(x => x.Id == gameCode);
                if (matchedGame != null)
                {
                    break;
                }
            }
            break;

        case "ags":
            commonCulture.appData.GetRootResourceNonLanguage("/Slots/ClubApollo.aspx", out xeResources);
            IEnumerable <XElement> apollo = xeResources.Element("Category").Element("Slots").Elements();
            break;

        case "ctxm":
        case "betsoft":
            // return for now
            commonCulture.appData.getRootResource("/Slots/ClubDivino.aspx", out xeResources);
            break;

        case "png":
        case "isoftbet":
            commonCulture.appData.getRootResource("/Slots/ClubGallardo.aspx", out xeResources);
            break;

        case "vanguard":
            commonCulture.appData.getRootResource("/Slots/ClubMassimo.aspx", out xeResources);
            break;

        case "playtech":
            commonCulture.appData.getRootResource("/Slots/ClubPalazzo.aspx", out xeResources);
            break;

        default:
            break;
        }

        return(matchedGame);
    }
Exemplo n.º 2
0
    public SlotPromoGame createGame(JsonSlotGamePromoListing promoGame)
    {
        var game    = new SlotPromoGame();
        var xmlGame = findGame(promoGame);

        if (xmlGame == null)
        {
            return(game);
        }
        var gameClub = promoGame.ProductCode;
        var gameCode = promoGame.HtmlGameId;
        var lang     = string.Empty;

        switch (gameClub)
        {
        case "slot":
            game.game_link  = xmlGame.RealUrl;
            game.image_link = "/_Static/Images/Games/"
                              + xmlGame.Image + ".jpg";
            break;

        case "ags":
            if (!string.IsNullOrEmpty(commonVariables.CurrentMemberSessionId))
            {
                game.game_link = CommonClubApollo.GetRealUrl
                                 .Replace("{GAME}", Convert.ToString(xmlGame.Name))
                                 .Replace("{LANG}", lang)
                                 .Replace("{TOKEN}", commonVariables.CurrentMemberSessionId);
            }
            break;

        case "ctxm":
        case "betsoft":
            break;

        case "png":
        case "isoftbet":
            break;

        case "vanguard":
            break;

        case "playtech":
            break;

        default:
            break;
        }
        game.Id       = promoGame.HtmlGameCode.ToString();
        game.club     = gameClub;
        game.clubName = commonProduct.GetWallet(game.club);
        game.name     = xmlGame.Title;

        return(game);
    }