diff --git a/Dipper.Alioth/Web/ServiceConvention.cs b/Dipper.Alioth/Web/StarletConvention.cs similarity index 98% rename from Dipper.Alioth/Web/ServiceConvention.cs rename to Dipper.Alioth/Web/StarletConvention.cs index bad72cd..0a36dbb 100644 --- a/Dipper.Alioth/Web/ServiceConvention.cs +++ b/Dipper.Alioth/Web/StarletConvention.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.ApplicationModels; namespace Dipper.Alioth.Web; -public class ServiceConvention : IApplicationModelConvention +public class StarletConvention : IApplicationModelConvention { public void Apply(ApplicationModel application) { diff --git a/Dipper.Alioth/Web/ServiceExtension.cs b/Dipper.Alioth/Web/StarletExtension.cs similarity index 90% rename from Dipper.Alioth/Web/ServiceExtension.cs rename to Dipper.Alioth/Web/StarletExtension.cs index 24538f7..f28bd87 100644 --- a/Dipper.Alioth/Web/ServiceExtension.cs +++ b/Dipper.Alioth/Web/StarletExtension.cs @@ -3,13 +3,14 @@ using Dipper.Alioth.Providers; using Dipper.Alioth.Starlets; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApplicationParts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace Dipper.Alioth.Web; -public static class ServiceExtension +public static class StarletExtension { public static WebApplicationBuilder AddStarApp(this WebApplicationBuilder builder, Action? action = null) { @@ -65,5 +66,10 @@ public static class ServiceExtension manager.FeatureProviders.Add(new ApiFeatureProvider()); }); + + builder.Services.Configure(options => + { + options.Conventions.Add(new StarletConvention()); + }); } } \ No newline at end of file diff --git a/Dipper.Alioth/Web/ServiceFeatureProvider.cs b/Dipper.Alioth/Web/StarletFeatureProvider.cs similarity index 85% rename from Dipper.Alioth/Web/ServiceFeatureProvider.cs rename to Dipper.Alioth/Web/StarletFeatureProvider.cs index cca6595..c04efd9 100644 --- a/Dipper.Alioth/Web/ServiceFeatureProvider.cs +++ b/Dipper.Alioth/Web/StarletFeatureProvider.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.Controllers; namespace Dipper.Alioth.Web; -public class ServiceFeatureProvider : ControllerFeatureProvider +public class StarletFeatureProvider : ControllerFeatureProvider { protected override bool IsController(TypeInfo typeInfo) {