[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
This commit is contained in:
alfredo-accuris
2024-10-30 00:41:35 -06:00
committed by GitHub
parent b627e1cc67
commit 9452873b99
12 changed files with 24 additions and 24 deletions

View File

@@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Client
if (response.Headers != null)
{
var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
? Path.GetTempPath()
? global::System.IO.Path.GetTempPath()
: _configuration.TempFolderPath;
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
foreach (var header in response.Headers)
@@ -377,7 +377,7 @@ namespace Org.OpenAPITools.Client
var bytes = ClientUtils.ReadAsBytes(file);
var fileStream = file as FileStream;
if (fileStream != null)
request.AddFile(fileParam.Key, bytes, Path.GetFileName(fileStream.Name));
request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name));
else
request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
}