зеркало из https://github.com/microsoft/kiota.git
remove async suffix for request adapter methods
This commit is contained in:
Родитель
437045d8ad
Коммит
d2dfd0c6b8
|
@ -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]
|
||||
|
|
Загрузка…
Ссылка в новой задаче