/// <inheritdoc />
        Listing IRepository <int, Listing> .Find(int identifier)
        {
            var request = new ListingDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo)
            };
            var response = this.serviceClient.Send <ListingDataContract>(request);

            return(this.converterForResponse.Convert(response, null));
        }
        /// <inheritdoc />
        Task <Listing> IRepository <int, Listing> .FindAsync(int identifier, CancellationToken cancellationToken)
        {
            var request = new ListingDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo)
            };
            var responseTask = this.serviceClient.SendAsync <ListingDataContract>(request, cancellationToken);

            return(responseTask.ContinueWith <Listing>(this.ConvertAsyncResponse, cancellationToken));
        }
示例#3
0
        /// <inheritdoc />
        async Task <Listing> IRepository <int, Listing> .FindAsync(int identifier, CancellationToken cancellationToken)
        {
            var request = new ListingDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo)
            };
            var response = await this.serviceClient.SendAsync <ListingDTO>(request, cancellationToken).ConfigureAwait(false);

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