Example #1
0
        /// <inheritdoc />
        World IRepository <int, World> .Find(int identifier)
        {
            IWorldRepository self = this;
            var request           = new WorldDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo),
                Culture    = self.Culture
            };
            var response = this.serviceClient.Send <WorldDataContract>(request);

            return(this.converterForResponse.Convert(response, null));
        }
Example #2
0
        /// <inheritdoc />
        Task <World> IRepository <int, World> .FindAsync(int identifier, CancellationToken cancellationToken)
        {
            IWorldRepository self = this;
            var request           = new WorldDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo),
                Culture    = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <WorldDataContract>(request, cancellationToken);

            return(responseTask.ContinueWith <World>(this.ConvertAsyncResponse, cancellationToken));
        }
Example #3
0
        /// <inheritdoc />
        async Task <World> IRepository <int, World> .FindAsync(int identifier, CancellationToken cancellationToken)
        {
            IWorldRepository self = this;
            var request           = new WorldDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo),
                Culture    = self.Culture
            };
            var response = await this.serviceClient.SendAsync <WorldDTO>(request, cancellationToken).ConfigureAwait(false);

            return(this.responseConverter.Convert(response, null));
        }