Exemplo n.º 1
0
 public ScoreV2Latest GetScoreWithOwner(
     [FromRoute(Name = "owner")]
     [MaxLength(128, ErrorMessage = "{0} は 128 文字以内です")]
     [MinLength(1, ErrorMessage = "{0} は 1 文字以上です")]
     [RegularExpression(@"^[a-zA-Z0-9\-_]+$", ErrorMessage = "{0} は 半角英数字 , - , _ が使用できます", MatchTimeoutInMilliseconds = 1000)]
     string owner,
     [FromRoute(Name = "score_name")]
     [MaxLength(128, ErrorMessage = "{0} は 128 文字以内です")]
     [MinLength(1, ErrorMessage = "{0} は 1 文字以上です")]
     [RegularExpression(@"^[a-zA-Z0-9\-_]+$", ErrorMessage = "{0} は 半角英数字 , - , _ が使用できます", MatchTimeoutInMilliseconds = 1000)]
     string scoreName)
 {
     try
     {
         return(_scoreProvider.GetScore(owner, scoreName));
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, ex.Message);
         throw new InvalidOperationException("楽譜の取得に失敗しました", ex);
     }
 }
Exemplo n.º 2
0
 private void OnNewHighScoreClicked()
 {
     signalBus.Fire(new NewHighScoreSignal(scoreProvider.GetScore()));
 }