diff --git a/Oqtane.Server/Modules/MVCModuleExtension.cs b/Oqtane.Server/Extensions/OqtaneMvcBuilderExtensions.cs similarity index 73% rename from Oqtane.Server/Modules/MVCModuleExtension.cs rename to Oqtane.Server/Extensions/OqtaneMvcBuilderExtensions.cs index bab0f869..948e1120 100644 --- a/Oqtane.Server/Modules/MVCModuleExtension.cs +++ b/Oqtane.Server/Extensions/OqtaneMvcBuilderExtensions.cs @@ -1,19 +1,18 @@ using System.Linq; -using System.Reflection; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ApplicationParts; namespace Microsoft.Extensions.DependencyInjection { - public static class MvcModuleExtensions + public static class OqtaneMvcBuilderExtensions { public static IMvcBuilder AddOqtaneApplicationParts(this IMvcBuilder mvcBuilder) { // load MVC application parts from module assemblies - foreach (Assembly assembly in OqtaneServiceCollectionExtensions.GetOqtaneModuleAssemblies()) + foreach (var assembly in OqtaneServiceCollectionExtensions.GetOqtaneModuleAssemblies()) { // check if assembly contains MVC Controllers - if (assembly.GetTypes().Where(item => item.IsSubclassOf(typeof(Controller))).ToArray().Length > 0) + if (assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(Controller))).ToArray().Length > 0) { var partFactory = ApplicationPartFactory.GetApplicationPartFactory(assembly); foreach (var part in partFactory.GetApplicationParts(assembly))