10 Commits

Author SHA1 Message Date
alfredo-accuris
9452873b99
[csharp] Mustache fully qualify namespace for Path (#19349)
* fix: csharp mustash fully qualify namespace Path

The generated code of Csharp get a fully quallify namespace for PATH

using Path = global::System.IO.Path;

* mend

* Remove alias for fully qualify Path class
2024-10-30 14:41:35 +08:00
Alec Petersen
b5b760a8a2
[csharp] Address obsolete build warnings in ApiClient (#19847)
* Stop using obsolete MaxTimeout

* Convert timeout to a timespan, rather than update the configuration object

* Use async overload of RestClientExtensions.Deserialize

* Update samples

* Fix typo

* Undo timeout change
2024-10-14 15:44:12 +08:00
Filipe Silva
af94bde2ce
#19176 fix Task.Result directly blocks thread (#19231)
- async should never be blocked on the ApiClient
 To fix we invert the logic and use Task as base and keep consistency, we expect and wait result only on synchronous calls.
2024-08-04 18:33:33 +08:00
Filipe Silva
8bac93e23b
[csharp] Improved apiclient.mustache (#18915)
* improved apiclient.mustache to keep it dry, sharing a single exec with Action<> delegate.

* updated samples and test

* Removed async from ApiClient.mustache

Updated samples

* Revert change to CSharpClientDeepObjectTest.java

* Fix async await (it was not waiting creating a null exception)

Updated samples

* Fix File IO namespace with using directive

* Improved comments on new methods

Added new DRY method DeserializeRestResponseFromPolicy

* Fix comments and parameters for new method DeserializeRestResponseFromPolicy

Updated samples
2024-06-15 17:54:14 +08:00
Torgil Folger
58f058f3e9
[csharp] RemoteCertificateValidationCallback was not called on async methods; resolves #14608 (#16886)
* Update ApiClient.mustache

added missing line in config mapping

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-10-28 20:29:38 +08:00
clement-brodu
1a458d3e0b
fix: memory leak with restclient (#13961) (#16365) 2023-08-21 20:26:37 +08:00
Renny S
bd76c1b102
[csharp] Update RestSharp to 110.2.0 (#16122)
* [csharp] Update RestSharp to 110.2.0

* Post './bin/generate-samples.sh bin/configs/csharp*' and './bin/utils/export_docs_generators.sh' scripts

* OAuthAuthenticator: use configureSerialization

* ContentType prop = RestSharp.ContentType.Json

* `req` -> `request` in `Exec()` and `ExecAsync()`

* Regenerate samples
2023-07-21 17:19:38 +08:00
Daniel Lange
6b62f2b05a
[csharp-netcore] Enable setting of RemoteCertificateValidationCallback through IReadableConfiguration (#15979)
* Fix for [BUG][C#][csharp] Use RestClient.RemoteCertificateValidationCallback for SSL validation #11497

* Fixed modification of wrong files through merging to master and applied the changes to the correct files

* Updated examples

* Forget some examples

* Updates branch to reflect master changes and published changed example files yet again to solve conflicts

* Fixed examples
2023-07-06 11:48:10 +08:00
Aswin Francis
ba0c73e164
[csharp] [Req#15932] Added support for windows authentication by exposing UseDefaultCredentials property (#15935)
* Added support for windows authentication by exposing UseDefaultCredentials property

* Updated samples and docs

* update doc, samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-07-03 15:53:47 +08:00
William Cheng
7c67f731bc
Rename csharp-netcore to csharp (#15903)
* rename csharp-netcore to csharp

* rename file

* renmae modules/openapi-generator/src/main/resources/csharp-netcore

* update samples

* mv dir

* update samples

* rename csharp-netcore to csharp in appveyor.yml

* update doc
2023-06-25 11:08:59 +08:00