Change scope of classes in Expressive.Helpers from internal to public
Closed this issue ยท 7 comments
Is your feature request related to a problem? Please describe.
I'm working on some custom functions including a variant of the In()
function that is less restrictive on the structure of the collection (can be spread over more than one parameter, mixes of single objects and IEnumerables
, etc). When I tried to use the same Comparison.CompareUsingMostPreciseType()
method as the built-in In()
function, I get the compiler error 'Comparison' is inaccessfible due to its protection level
.
Basically, just the same easy issue as #85 / #89.
Describe the solution you'd like
For Expressive.Helpers.Comparison
, Expressive.Helpers.Numbers
, and Expressive.Helpers.TypeHelper
, change class scope from internal
to public
.
I am starting to think I should just open up everything ๐
Happy to include this in the Next Release
๐
@bijington once I have my functions finished up, I'll share info about them with you. If there are any you might be interested in adding to the Expressive repertoire in a future release, I'll be happy to set up a pull request for you to review.
For example, another one I've built is a JoinText()
function that lets you concatenate a collection of strings and evaluable expressions (same permissive parameter structures as described above for In()
) , with a delimiter character/string between each one (can be empty for straight-up concatenation). Really handy for composing text from a parameterized template.
@graniero great thanks. I can see the value in that one much like string.Join
. Something that has cropped up where I currently work is the possibility of a Format
function that would work in a similar way to string.Format
, is that potentially of value as a shared function?
Yep, it's basically the same as string.Join
.
A Format
function would be really cool in general, but on my current work project it's not a priority need. It's an engineering monitor & control system, so the vast majority of my Expressive usage is for math calculations and logical tests. My life is buried in communication protocols and calculation & rule engine construction. ๐ฌ
I am using Expressive in a few places though to set up a crude 'text template' with some simple value substitution, and no real need for formatting the subbed values. I originally built the JoinText()
function to make nice comma-separated lists of text elements, then realized it basically covers all my text template needs too. Having multiple IEnumerable
parameters lets me mash together sub-templates too.
Sounds great! Thanks for sharing some details about how you use Expressive too ๐
Sorry I do intend on getting this done soon
No worries. I've been totally absorbed building functionality to deadline in another part of the system. I won't be back into that part for about a week - you know I'll be back at it when I finally set up that PR with the functions I promised for you. ๐ฌ