Skip to content

Added parameters to configure Fody.ToString output#21

Closed
otebos wants to merge 6 commits intoFody:masterfrom
otebos:master
Closed

Added parameters to configure Fody.ToString output#21
otebos wants to merge 6 commits intoFody:masterfrom
otebos:master

Conversation

@otebos
Copy link
Copy Markdown

@otebos otebos commented Jan 17, 2017

I've added 4 parameters to configure output:
PropertyNameToValueSeparator - defines the separator used between property name and property value
PropertiesSeparator - defines separator used between properties (and between class name and first property)
WrapWithBrackets - defines if output should be wrapped with curly brackets
WriteTypeName - defines if T: should be in output.

All attributes have fall-back strategy to normal behavior - so if no parameters are provided output is exactly the same as it was before this change.

Usage:
<ToString PropertyNameToValueSeparator="->" PropertiesSeparator=" , " WrapWithBrackets="false" WriteTypeName="false" />

I made those changes because this lib is doing great job but I needed the ToString output less human-readable, more easy-to-process later.

@otebos
Copy link
Copy Markdown
Author

otebos commented Jan 17, 2017

There are also UnitTests to prove those parameters work.
Also all old tests are green :)

@SimonCropp
Copy link
Copy Markdown
Member

this slipped off the radar. can u rebase

@SimonCropp
Copy link
Copy Markdown
Member

merged manually here d3b337b

@SimonCropp SimonCropp closed this Oct 19, 2018
@SimonCropp SimonCropp added this to the 1.10.5 milestone Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants