Signature change introduces new lines

I refactored one of my classes to introduce a new parameter, but the parameter declaration is put on a new line e.g.

protected override async Task<IClientResponse> OnImport(Model.Qualification source, PropertyBag context)
when to

protected override async Task<IClientResponse> OnImport(Model.Qualification source, PropertyBag context,
CancellationToken cancellationToken)

Is there anyway of forcing it to just keep it on the same line as the other parameters?

0
5 comments

Hello Paul!

 

Thank you for contacting us.

This behavior could be caused by formatting options. Could you please provide screenshot illustrating settings of ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | Arrangement of Method Signatures.

Thank you.

0

Angelina

Here's the screenshot

The lines are not particularly long which is why I wondering why they wrap

0

Hello Paul,

The refactored line of code is long enough to be more than the threshold specified in "Right margin (column)" setting at the top of the screenshot you attached. So, you might untick the "Wrap long lines" checkbox or increase a max number of symbols in "Right margin (column)" field.

Thanks! 

0

Alexander

Thanks for the response, sorry to be dumb but how does the "right margin" column work - is the line length subtracted from it it and then wrapping starts?

0

Paul, it is "max line length", so if a line is longer, it will be wrapped to be less than this value.

0

Please sign in to leave a comment.