-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParenthesizedLambdaExpressions needs some work. #238
Comments
This got mostly resolved, so the only part left is to clean up the indentation. |
You think something like this might look better? To make it clear that the braces aren't for the outer level statement, but rather the lambda being passed in? var task = Task.Factory.StartNew(async () =>
{
return await new WebClient().DownloadStringTaskAsync(
"http://example.com"
);
}
); |
It actually formats really close to that now var task = Task.Factory.StartNew(
async () =>
{
return await new WebClient().DownloadStringTaskAsync(
"http://example.comddddddddddddddddddd"
);
}
); Prettier formats it like this var task = Task.Factory.StartNew(async () => {
return await new WebClient().DownloadStringTaskAsync(
"http://example.comddddddddddddddddddd"
);
}); But I don't think we want to have the brace on the same line as We could maybe move the var task = Task.Factory.StartNew(async () =>
{
return await new WebClient().DownloadStringTaskAsync(
"http://example.com"
);
}); Which leaves us with doing what you said var task = Task.Factory.StartNew(async () =>
{
return await new WebClient().DownloadStringTaskAsync(
"http://example.com"
);
}
);
// however if there are multiple parameters
var task = Task.Factory.StartNew(
async () =>
{
return await new WebClient().DownloadStringTaskAsync(
"http://example.com"
);
},
someOtherParameter
); |
The text was updated successfully, but these errors were encountered: