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
NamedAttribute is privileged at this point; Keys knows what it is and how to accommodate it. This was done initially to make implementing Stiletto less complicated, but Now is the Right Time to add generalized qualifiers.
For example, instead of [Inject, Named("listen-port")], you could have [Inject, ListenPort]
declared like so:
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter|AttributeTargets.Method)]
public class ListenPortAttribute : QualifierAttribute {}
The text was updated successfully, but these errors were encountered:
Stumbling block: how to handle ctor parameters and properties consistently between fody and runtime? This works in Java because annotations don't have executable code.
Can we create a string repr based on consistently-ordered fields and properties? It works in the compiled form, maybe, but how to access that at runtime without instantiating the attribute (thus allowing arbitrary code to run)?
Potential solution: CustomAttributeData.GetCustomAttributes in ReflectionOnly context; this gives us the raw ctor argumentes as stored in metadata. Can we do this on an assembly that's already loaded in execution context?
...goddamnit, that API doesn't exist in Silverlight!
NamedAttribute is privileged at this point; Keys knows what it is and how to accommodate it. This was done initially to make implementing Stiletto less complicated, but Now is the Right Time to add generalized qualifiers.
For example, instead of [Inject, Named("listen-port")], you could have [Inject, ListenPort]
declared like so:
The text was updated successfully, but these errors were encountered: