I am currently facing an issue while trying to verify a condition in the tst (typescript generator) file within my C# application. The error message I am encountering states that the Operator '&&' cannot be applied to operands of type 'method group'. This error specifically appears in the ObserveResponse section where I am checking for HasParameters.
bool HasParameters(Method m) => m.Parameters != null && m.Parameters.Count > 0 ? true : false;
string ObserveResponse(Method m)
{
var api = (Class)m.Parent;
if ((api.Attributes.Any(i=>i.Name=="AllowAnonymous")) && HasParameters ) return ",{observe: 'response'}";
if (api.Attributes.Any(i=>i.Name=="Authorize")) return '';
if (m.Attributes.Any(i=>i.Name=="AllowAnonymous")) return ",{observe: 'response'}";
if (m.Attributes.Any(i=>i.Name=="Authorize")) return '';
return "#ERROR";
}