public static Task <PlayerData> GetConnectionArgsAsync(Client client) { ShopData shopData = null; PlayerObject playerObject = null; var vaultTask = client.PayVault.RefreshAsync() .Then(task => shopData = new ShopData(client.PayVault.Items)); var playerObjectTask = client.BigDB.LoadMyPlayerObjectAsync() .Then(task => playerObject = new PlayerObject(task.Result)); return(vaultTask .Then(t => playerObjectTask) .Then(t => new PlayerData(playerObject, shopData)) .ToSafeTask()); }
public ConnectionArgs(ShopData shopData, PlayerObject playerObject) { this.ShopData = shopData; this.PlayerObject = playerObject; }
public PlayerData(PlayerObject playerObject, ShopData shopData) { this.PlayerObject = playerObject; this.ShopData = shopData; }