Why is the signature of AddServiceDefaults() changed in aspire 9? #234
-
// aspire 8
public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder){}
// aspire 9
public static TBuilder AddServiceDefaults<TBuilder>(this TBuilder builder) where TBuilder : IHostApplicationBuilder{} |
Beta Was this translation helpful? Give feedback.
Answered by
christiannagel
Apr 9, 2025
Replies: 1 comment
-
|
With the generic version of Aspire 9, the type of the builder ( |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
christiannagel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With the generic version of Aspire 9, the type of the builder (
TBuilder) is available within the implementation of the method. This gives more flexibility.I need to check into this, but this could probably be used with the Azure Functions support which is currently in preview.
A different implementation overload could also be added for another builder type.