Open Dennis-Petrov opened 1 year ago
Hello. The question is about method chaining style for LINQ and similar fluent APIs. I'm looking for a rule, which can force this style:
var result = source .Where(...) .GroupBy(...) .Select(...); // and so on
or, at least this one:
var result = source.Where(...) .GroupBy(...) .Select(...); // and so on
and forbid one-liners like this:
var result = source.Where(...).GroupBy(...).Select(...); // and so on
Probably, this one had been answered already, but I can't find anything related. Is there any rule out-of-box?
Personally, I don't think this would be a good rule. I see no problem with one-liners as long as they are short and would not like to be forced to split them up.
Hello. The question is about method chaining style for LINQ and similar fluent APIs. I'm looking for a rule, which can force this style:
or, at least this one:
and forbid one-liners like this:
Probably, this one had been answered already, but I can't find anything related. Is there any rule out-of-box?