From 5fd3d2b3385bfbf86e4d55b5fefee6134c60c9ae Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Mon, 18 Mar 2024 20:53:46 +0900 Subject: [PATCH] #45 Add GenerateDocumentationFile property and fix xml docs --- DeepL/DeepL.csproj | 2 ++ DeepL/Internal/DeepLClient.cs | 2 +- DeepL/Internal/JsonUtils.cs | 8 ++++---- DeepL/Translator.cs | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/DeepL/DeepL.csproj b/DeepL/DeepL.csproj index e05e889..717b722 100644 --- a/DeepL/DeepL.csproj +++ b/DeepL/DeepL.csproj @@ -29,6 +29,8 @@ true true sgKey.snk + true + $(NoWarn);CS1591 diff --git a/DeepL/Internal/DeepLClient.cs b/DeepL/Internal/DeepLClient.cs index dba9e01..28c9a29 100644 --- a/DeepL/Internal/DeepLClient.cs +++ b/DeepL/Internal/DeepLClient.cs @@ -248,7 +248,7 @@ public async Task ApiPostAsync( /// The cancellation token to cancel operation. /// Parameters to embed in the HTTP request body. /// Optional file content to upload in request. - /// If is used, the name of file. + /// If is used, the name of file. /// received from DeepL API. /// If any failure occurs while sending the request. public async Task ApiUploadAsync( diff --git a/DeepL/Internal/JsonUtils.cs b/DeepL/Internal/JsonUtils.cs index 6fb07be..23e78a2 100644 --- a/DeepL/Internal/JsonUtils.cs +++ b/DeepL/Internal/JsonUtils.cs @@ -16,24 +16,24 @@ internal static class JsonUtils { new JsonSerializerOptions { PropertyNamingPolicy = LowerSnakeCaseNamingPolicy.Instance }; /// - /// Deserializes JSON data in given HTTP response into a new object of type, with fields named in + /// Deserializes JSON data in given HTTP response into a new object of type, with fields named in /// lower-snake-case. /// /// containing HTTP response received from DeepL API. /// Type of deserialized object. - /// Object of type initialized with values from JSON data. + /// Object of type initialized with values from JSON data. /// If the JSON data could not be deserialized correctly. internal static async Task DeserializeAsync(HttpResponseMessage responseMessage) => await DeserializeAsync(await responseMessage.Content.ReadAsStreamAsync().ConfigureAwait(false)) .ConfigureAwait(false); /// - /// Deserializes JSON data in given stream into a new object of type, with fields named in + /// Deserializes JSON data in given stream into a new object of type, with fields named in /// lower-snake-case. /// /// Stream containing JSON data. /// Type of deserialized object. - /// Object of type initialized with values from JSON data. + /// Object of type initialized with values from JSON data. /// If the JSON data could not be deserialized correctly. internal static async Task DeserializeAsync(Stream contentStream) { using var reader = new StreamReader(contentStream); diff --git a/DeepL/Translator.cs b/DeepL/Translator.cs index f609193..bcce3ae 100644 --- a/DeepL/Translator.cs +++ b/DeepL/Translator.cs @@ -1,4 +1,4 @@ -// Copyright 2022 DeepL SE (https://www.deepl.com) +// Copyright 2022 DeepL SE (https://www.deepl.com) // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. @@ -79,7 +79,7 @@ Task TranslateTextAsync( /// If cancellation was requested, or an error occurs while translating the document. If the document was uploaded /// successfully, then the contains the document ID and /// key that may be used to retrieve the document. - /// If cancellation was requested, the will be a + /// If cancellation was requested, the will be a /// . /// Task TranslateDocumentAsync( @@ -105,7 +105,7 @@ Task TranslateDocumentAsync( /// If cancellation was requested, or an error occurs while translating the document. If the document was uploaded /// successfully, then the contains the document ID and /// key that may be used to retrieve the document. - /// If cancellation was requested, the will be a + /// If cancellation was requested, the will be a /// . /// Task TranslateDocumentAsync( @@ -854,7 +854,7 @@ await _client.ApiGetAsync("/v2/languages", cancellationToken, queryParams) /// true to send platform information with every API request (default), /// false to only send the library version. /// - /// + /// /// Name and version of the application using this library. Ignored if null. /// /// Enumerable of tuples containing the parameters to include in HTTP request.