Ejemplo n.º 1
0
        /// <inheritdoc />
        Continent IRepository <int, Continent> .Find(int identifier)
        {
            var request = new ContinentDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo),
                Culture    = ((ILocalizable)this).Culture
            };
            var response = this.serviceClient.Send <ContinentDTO>(request);

            return(this.responseConverter.Convert(response, null));
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        async Task <Continent> IRepository <int, Continent> .FindAsync(int identifier, CancellationToken cancellationToken)
        {
            var request = new ContinentDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo),
                Culture    = ((ILocalizable)this).Culture
            };
            var response = await this.serviceClient.SendAsync <ContinentDTO>(request, cancellationToken).ConfigureAwait(false);

            return(this.responseConverter.Convert(response, null));
        }
Ejemplo n.º 3
0
        /// <inheritdoc />
        Task <Continent> IRepository <int, Continent> .FindAsync(int identifier, CancellationToken cancellationToken)
        {
            var request = new ContinentDetailsRequest
            {
                Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo),
                Culture    = ((ILocalizable)this).Culture
            };
            var responseTask = this.serviceClient.SendAsync <ContinentDataContract>(request, cancellationToken);

            return(responseTask.ContinueWith <Continent>(this.ConvertAsyncResponse, cancellationToken));
        }