Khi tôi định dạng tự động với Resharper CTRL + ALT + SHIFT + F cho đường dây dài hơn chiều dài dòng tối đa (trong trường hợp của tôi nói đó là 80 ký tự), tôi nhận được như sau:Làm thế nào để dừng Resharper từ ngắt dòng sau khi trở về từ khóa cho đường dài?
return
View(new ViewModel
{
Identifier = identifier,
Files = service.AllFiles()
});
Nhưng những gì tôi thực sự muốn là nó đừng bó sau khi "trở lại" từ khóa (tức là không có từ khóa lợi nhuận trên một dòng tất cả các ngày của riêng mình), như vậy:
return View(new ViewModel
{
Identifier = identifier,
Files = service.AllFiles()
});
có ai biết làm thế nào để "cấu hình" Resharper để làm điều này xảy ra? :)
Dưới đây là một ví dụ khác, đây là những gì tôi nhìn thấy bây giờ:
return
repository.Session.CreateCriteria(typeof(SomeType))
.Add(Expression.Eq("Identifier", identifier))
.UniqueResult<SomeType>();
Khi tôi thực sự muốn xem:
return repository.Session.CreateCriteria(typeof(SomeType))
.Add(Expression.Eq("Identifier", identifier))
.UniqueResult<SomeType>();
UPDATE:
Đây là " chop luôn ":
return View(new OrganisationFileLoadViewModel
{
Identifier = identifier,
AllExistingOrganisationFiles = nmdsOrganisationFileLoadService.AllNMDSOrganisationFiles()
});
Dưới đây là "chop nếu dài":
return
View(new OrganisationFileLoadViewModel
{
Identifier = identifier,
AllExistingOrganisationFiles = nmdsOrganisationFileLoadService.AllNMDSOrganisationFiles()
});
Bạn đã báo cáo lỗi này với JetBrains chưa? –
Tôi vui mừng nếu nó chắc chắn là một lỗi và không chỉ là một thiết lập mà tôi đã sai ...? –
Đó chắc chắn là một lỗi. –