fx
fx copied to clipboard
Allow multiple annotations per function
With the new OnStart
annotations being added in #895, some annotations actually might make sense for multiple annotations to take place for the same function.
For instance, the following nested annotation would allow us to specify OnStart hooks using annotations without being confusing about the order in which the hooks are executed:
fx.Annotate(
fx.Annotate(
func() { ... },
fx.OnStart(...) // this hook will run first
),
fx.OnStart(...) // followed by this
)