We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example, if I have a class Foo<T> with a property T Bar.
Foo<T>
T Bar
In v1 of the library, I could define an extension method WithBar(T myT) => builder.With(x => x.Bar, mtY), and it would work nicely.
WithBar(T myT) => builder.With(x => x.Bar, mtY)
In v4, there are type restrictions enforcing that With can only be called if T : struct, and WithSharedRef can only be called if T : class
With
WithSharedRef
This renders my example extension method no longer feasible, provided T is not restricted to either a struct or a class.
T
@Brondahl has pointed out that WithCustomSetup can be used, but it's not ideal.
WithCustomSetup
Ideally we'll tweak the API such that this case is neatly supported - but in the worst case we can just call out this case in the REAMDE
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For example, if I have a class
Foo<T>
with a propertyT Bar
.In v1 of the library, I could define an extension method
WithBar(T myT) => builder.With(x => x.Bar, mtY)
, and it would work nicely.In v4, there are type restrictions enforcing that
With
can only be called if T : struct, andWithSharedRef
can only be called if T : classThis renders my example extension method no longer feasible, provided
T
is not restricted to either a struct or a class.@Brondahl has pointed out that
WithCustomSetup
can be used, but it's not ideal.Ideally we'll tweak the API such that this case is neatly supported - but in the worst case we can just call out this case in the REAMDE
The text was updated successfully, but these errors were encountered: