コード例 #1
0
 public string GetBattleTag()
 {
     if (String.IsNullOrEmpty(BattleTag))
     {
         throw new ArgumentException("Name is not defined");
     }
     return(BattleTag.Replace("#", "-"));
 }
コード例 #2
0
ファイル: DiabloProfile.cs プロジェクト: Xenophik/WContact
 /// <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;
             }
         }
     }
 }