CodeRush's Document Formatting feature transforms this:
C#// Automatically refresh tokens if authorization fails.
var policy = Policy
.Handle<FaultException>(ex => ex.Code.Name == "INVALID_SESSION_ID")
.RetryAsync(
retryCount: 1,
onRetryAsync: async (outcome, retryNumber, context) =>
{
mLogger.LogInformation("Authorization with metadata API failed (API returned INVALID_SESSION_ID error); attempting to refresh access token.");
_ = await mOrgAccessProvider.GetAccessTokenAsync(forceRefresh: true);
});
into this:
C#// Automatically refresh tokens if authorization fails.
var policy = Policy
.Handle<FaultException>(ex => ex.Code.Name == "INVALID_SESSION_ID")
.RetryAsync(
retryCount: 1,
onRetryAsync: async(outcome, retryNumber, context) =>
{
mLogger.LogInformation("Authorization with metadata API failed (API returned INVALID_SESSION_ID error); attempting to refresh access token.");
_ = await mOrgAccessProvider.GetAccessTokenAsync(forceRefresh: true);
});
Note that the space between "async" and the lambda parameter list on line 6 has been removed.
I have searched through the formatting settings but cannot find any way to configure this behavior. The closest related setting I can find is in the attached screenshot, but obviously that one has no effect on this.