You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be nice having an option to also have generic type named parameters:
public TChannel Proxy<TEntity, TProperty, TChannel>(TEntity entity, TProperty property);
Now we have 2 inferred args while the last one is not. Now in order for this function to work, we need to provide all the type-arguments when calling this method (i.e. var channel = this.Proxy<MyEntity, MyProperty, MyChannel>(entity, property);.
The goal is, if we have named type-parameters, so to be able to omit the redundant ones:
public TChannel Proxy<TEntity, p: TProperty, TChannel>(TEntity entity, TProperty property);
Usage:
var channel = this.Proxy<p:MyProperty>(entity, property);
Obviously there are nicer and more efficient ways to achieve this, I was merely opening this issue as a discussion board of this general idea, and if there is interest, then discuss the ways to implement that.
Although I tried to search before posting I couldn't find a similar one, I'd be delighted to find out this is been discussed already and would love to enrich my knowledge.
Thanks everybody!
The text was updated successfully, but these errors were encountered:
Hi,
It could be nice having an option to also have generic type named parameters:
Now we have 2 inferred args while the last one is not. Now in order for this function to work, we need to provide all the type-arguments when calling this method (i.e.
var channel = this.Proxy<MyEntity, MyProperty, MyChannel>(entity, property);
.The goal is, if we have named type-parameters, so to be able to omit the redundant ones:
Usage:
Obviously there are nicer and more efficient ways to achieve this, I was merely opening this issue as a discussion board of this general idea, and if there is interest, then discuss the ways to implement that.
Although I tried to search before posting I couldn't find a similar one, I'd be delighted to find out this is been discussed already and would love to enrich my knowledge.
Thanks everybody!
The text was updated successfully, but these errors were encountered: