Example #1
0
        public override async Task <TargetType> ExecuteAsync(CancellationToken?token = null)
        {
            Query <SourceType> query = Query <TargetType> .Copy(this, new Query <SourceType>(this.Client));

            SourceType result = await query.ExecuteAsync(token);

            return(map(result));
        }
Example #2
0
        public override async Task <TargetType> ExecuteAsync(CancellationToken token = default(CancellationToken))
        {
            Query <SourceType> query = Query <TargetType> .Copy(this, new Query <SourceType>(this.Client));

            SourceType result = await query.ExecuteAsync(token).ConfigureAwait(false);

            var targetResult = map(result);

            return(Constraint.NotNull(() => targetResult));
        }