Beispiel #1
0
 public async Task <QueryResult> AddCharacterUsage(string character, Usage usage)
 {
     if (usage == null)
     {
         return(QueryResult.EmptyField(nameof(usage)));
     }
     if (string.IsNullOrEmpty(character))
     {
         return(QueryResult.EmptyField(nameof(character)));
     }
     if (usage.Sentence == null)
     {
         return(QueryResult.InvalidField(nameof(usage)));
     }
     return(QueryResult.QueryFailed(await _characterManager.UpdateUsageAsync(character, usage)));
 }