Current filter:
                                You should refresh the page.
                                  • [DevExpress Support Team: CLONED FROM T538933: Code Formatter - How do I get what I'm looking for with a compound statement?]

                                    For instance, what I want is:

                                    [C#]
                                    MyServiceRequest request = new MyServiceRequest() { InvoiceId = myInvoiceId, MyStuffArray = calculatedStuff .Select(myItem => new MyStuff() { StuffId = myItem.StuffId, ProductLookupId = myItem.ProductLookupId, }) .ToArray(), };

                                    The closest I can get after playing with the formatting settings is:

                                    [C#]
                                    MyServiceRequest request = new MyServiceRequest() { InvoiceId = myInvoiceId, MyStuffArray = calculatedStuff .Select(myItem => new MyStuff() { StuffId = myItem.StuffId, ProductLookupId = myItem.ProductLookupId, }) .ToArray(), };

                                    .ToArray should be chaining with .Select, and should be indented at the same level as .Select.

                                • George K (DevExpress) 07.25.2017

                                  Hi Jason,
                                  Thanks for the code snippet.
                                  We are working on it. Please give us some time to research the issue in detail.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed:


                                Additional information:

                                We have fixed this particular issue with indenting the ".ToArray" method call.
                                We have added the "Align by First Dot" option for chained method calls, so setting this option will allow you to get the required behavior.

                                The fix will be available in CodeRush for Roslyn v17.1.7.