remove async suffix for request adapter methods

This commit is contained in:
koros 2024-02-27 23:48:01 +03:00
Родитель 437045d8ad
Коммит d2dfd0c6b8
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -188,15 +188,15 @@ public class CodeConstantWriter : BaseElementWriter<CodeConstant, TypeScriptConv
}
private string GetSendRequestMethodName(bool isVoid, bool isStream, bool isCollection, string returnType)
{
if (isVoid) return "sendNoResponseContentAsync";
if (isVoid) return "sendNoResponseContent";
if (isCollection)
{
if (conventions.IsPrimitiveType(returnType)) return $"sendCollectionOfPrimitiveAsync";
return $"sendCollectionAsync";
if (conventions.IsPrimitiveType(returnType)) return $"sendCollectionOfPrimitive";
return $"sendCollection";
}
if (isStream || conventions.IsPrimitiveType(returnType)) return $"sendPrimitiveAsync";
return $"sendAsync";
if (isStream || conventions.IsPrimitiveType(returnType)) return $"sendPrimitive";
return $"send";
}
private void WriteUriTemplateConstant(CodeConstant codeElement, LanguageWriter writer)

Просмотреть файл

@ -183,7 +183,7 @@ public sealed class CodeConstantWriterTests : IDisposable
});
writer.Write(constant);
var result = tw.ToString();
Assert.Contains("sendCollectionAsync", result);
Assert.Contains("sendCollection", result);
AssertExtensions.CurlyBracesAreClosed(result);
}
[Fact]