Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
        /// <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));
        }
Exemplo n.º 3
0
        /// <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));
        }
Exemplo n.º 4
0
        /// <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));
        }