Ah, it turns out that it’s not a bug and it’s written down correctly, but i just didn’t spot what i was doing wrong. This makes the rule happy:
public Task RemoveIdentityAsync(string identityId)
{
if (string.IsNullOrEmpty(identityId))
{
throw new ArgumentNullException(nameof(identityId));
}
return RemoveIdentityInternalAsync(identityId);
}
I"ve spend more time on reading the rule and i just have to confess i didn’t read it properly, and was mostly making assumptions. My focus was on the splitting part and overlooked the clearly stated part
Therefore it is recommended to split the method into two: an outer method handling the parameter checks (without being async/await ) and an inner method to handle the iterator block with the async/await pattern.
I don’t see how this could be described better. Perhaps it can be higlighted in bold for people like me