public string GetBattleTag() { if (String.IsNullOrEmpty(BattleTag)) { throw new ArgumentException("Name is not defined"); } return(BattleTag.Replace("#", "-")); }
/// <summary> /// Handle deserialization of hero collection /// </summary> /// <param name="heroCollection">hero collection</param> private void OnHeroCollectionDeserialized(IList <Hero> heroCollection) { if (heroCollection != null) { foreach (var hero in heroCollection) { if (hero != null) { hero.Path = "/api/d3/profile/" + BattleTag.Replace('#', '-') + "/hero/" + hero.Id; } } } }