Skip to content

Commit

Permalink
Merge pull request #910 from ArtemevAL/patch-2
Browse files Browse the repository at this point in the history
Remove CancellationToken for async methods from wsdl
  • Loading branch information
andersjonsson authored Oct 20, 2022
2 parents 14e4c40 + 277ad3e commit 0a2cfec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SoapCore/Meta/MetaWCFBodyWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ private void WriteParameters(XmlDictionaryWriter writer, SoapMethodParameterInfo
{
foreach (var parameterInfo in parameterInfos)
{
if (parameterInfo.Parameter.ParameterType.FullName == "System.Threading.CancellationToken")
continue;
var elementAttribute = parameterInfo.Parameter.GetCustomAttribute<XmlElementAttribute>();
var parameterName = !string.IsNullOrEmpty(elementAttribute?.ElementName)
? elementAttribute.ElementName
Expand Down Expand Up @@ -268,6 +270,8 @@ private void AddContractOperations(XmlDictionaryWriter writer, ContractDescripti
{
var type = parameter.Parameter.ParameterType;
var typeInfo = type.GetTypeInfo();
if (typeInfo.FullName == "System.Threading.CancellationToken")
continue;
if (typeInfo.IsByRef)
{
type = typeInfo.GetElementType();
Expand Down

0 comments on commit 0a2cfec

Please sign in to comment.