Idea: Remove the requirements for (implicit) converters to be public #2763
Replies: 6 comments
-
Target typed new would allow: GetDbObjs(new(Applic, Db)) |
Beta Was this translation helpful? Give feedback.
-
if we only had Target typed new already... |
Beta Was this translation helpful? Give feedback.
-
Target typed new is scheduled for 8.1, and will almost certainly be released before this feature. |
Beta Was this translation helpful? Give feedback.
-
this should be noted in here perhaps: |
Beta Was this translation helpful? Give feedback.
-
What should be noted in there? |
Beta Was this translation helpful? Give feedback.
-
Small nit: @AdmiralSnyder you mean conversions, not converters. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
it would be nice if implicit converters (or converters in general) could be declared non-public i.e. private, protected or internal.
Since it's possible to convert from ValueTuples, this gives the opportunity to make sourcecode much denser for often-used conversions, but it would be nice to restrict the usage of those converters for library-internal use.
my specific usecase is for parameter-collection classes where i convert refactor a call from
GetDbObjs(new DbObjCreateArgs<Class>(Applic, Db))
to
GetDbObjs((Applic, Db))
I'd like to be able to restrict the usage of those converters to the scopes i want to.
Beta Was this translation helpful? Give feedback.
All reactions