예제 #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));
        }
예제 #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));
        }
예제 #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));
        }