/// <inheritdoc /> Guild IRepository <Guid, Guild> .Find(Guid identifier) { var request = new GuildRequest { GuildId = identifier }; var response = this.serviceClient.Send <GuildDTO>(request); if (response.Content == null) { return(null); } return(this.guildConverter.Convert(response.Content, null)); }
/// <inheritdoc /> Guild IGuildRepository.FindByName(string name) { var request = new GuildRequest { GuildName = name }; var response = this.serviceClient.Send <GuildDTO>(request); if (response.Content == null) { return(null); } return(this.guildConverter.Convert(response.Content, null)); }
/// <inheritdoc /> async Task <Guild> IGuildRepository.FindByNameAsync(string name, CancellationToken cancellationToken) { var request = new GuildRequest { GuildName = name }; var response = await this.serviceClient.SendAsync <GuildDTO>(request, cancellationToken).ConfigureAwait(false); if (response.Content == null) { return(null); } return(this.guildConverter.Convert(response.Content, response)); }
/// <inheritdoc /> async Task <Guild> IRepository <Guid, Guild> .FindAsync(Guid identifier, CancellationToken cancellationToken) { var request = new GuildRequest { GuildId = identifier }; var response = await this.serviceClient.SendAsync <GuildDTO>(request, cancellationToken).ConfigureAwait(false); if (response.Content == null) { return(null); } return(this.guildConverter.Convert(response.Content, response)); }