Can't use _sb in Printer when overriding methods
Closed this issue · 3 comments
First, thank you for creating this library. It's great.
I'm writing on a small utility that automatically updates Grafana dashboards so I can easily import them without too much manual tweaking.
One of the changes I wanted to do is replace duration to be $__rate_interval
.
I could easily do this by overriding the Duration
visitor in the Printer
class, but because _sb
is private
, I can't change the logic (which expects a timespan
)
I'd like to suggest making the access modifier for _sb
to be protected
to allow use by overriding methods
Thanks @oyosefi!
I did leave a protected method Write
available for this reason, does that work for you? I'd prefer to expose specific functionality vs the entire StringBuilder
.
Btw this might be useful: https://github.com/djluck/PromQL.Parser/blob/master/tests/PromQL.Parser.Tests/ExtensibilityTests.cs