コード例 #1
0
        public virtual ApiLinkLogClientRequestModel MapClientResponseToRequest(
            ApiLinkLogClientResponseModel response)
        {
            var request = new ApiLinkLogClientRequestModel();

            request.SetProperties(
                response.DateEntered,
                response.LinkId,
                response.Log);
            return(request);
        }
コード例 #2
0
        public virtual ApiLinkLogClientResponseModel MapClientRequestToResponse(
            int id,
            ApiLinkLogClientRequestModel request)
        {
            var response = new ApiLinkLogClientResponseModel();

            response.SetProperties(id,
                                   request.DateEntered,
                                   request.LinkId,
                                   request.Log);
            return(response);
        }
コード例 #3
0
ファイル: ApiClient.cs プロジェクト: codenesium/samples
        public virtual async Task <UpdateResponse <ApiLinkLogClientResponseModel> > LinkLogUpdateAsync(int id, ApiLinkLogClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/LinkLogs/{id}", item, cancellationToken).ConfigureAwait(false);

            this.HandleResponseCode(httpResponse);
            return(JsonConvert.DeserializeObject <UpdateResponse <ApiLinkLogClientResponseModel> >(httpResponse.Content.ContentToString()));
        }