diff --git a/Oqtane.Server/Controllers/ModuleDefinitionController.cs b/Oqtane.Server/Controllers/ModuleDefinitionController.cs index 2176c9f3..a637be69 100644 --- a/Oqtane.Server/Controllers/ModuleDefinitionController.cs +++ b/Oqtane.Server/Controllers/ModuleDefinitionController.cs @@ -194,7 +194,7 @@ namespace Oqtane.Controllers { try { - if (moduletype.GetInterface("IInstallable") != null) + if (moduletype.GetInterface(nameof(IInstallable)) != null) { _tenantManager.SetTenant(tenant.TenantId); var moduleobject = ActivatorUtilities.CreateInstance(_serviceProvider, moduletype); diff --git a/Oqtane.Server/Infrastructure/DatabaseManager.cs b/Oqtane.Server/Infrastructure/DatabaseManager.cs index ad472f37..3d9be5de 100644 --- a/Oqtane.Server/Infrastructure/DatabaseManager.cs +++ b/Oqtane.Server/Infrastructure/DatabaseManager.cs @@ -452,7 +452,7 @@ namespace Oqtane.Infrastructure { try { - if (moduleType.GetInterface("IInstallable") != null) + if (moduleType.GetInterface(nameof(IInstallable)) != null) { tenantManager.SetTenant(tenant.TenantId); var moduleObject = ActivatorUtilities.CreateInstance(scope.ServiceProvider, moduleType) as IInstallable; diff --git a/Oqtane.Server/Pages/Sitemap.cshtml.cs b/Oqtane.Server/Pages/Sitemap.cshtml.cs index 2435f831..96501294 100644 --- a/Oqtane.Server/Pages/Sitemap.cshtml.cs +++ b/Oqtane.Server/Pages/Sitemap.cshtml.cs @@ -73,7 +73,7 @@ namespace Oqtane.Pages if (moduleDefinition != null && moduleDefinition.ServerManagerType != "") { Type moduletype = Type.GetType(moduleDefinition.ServerManagerType); - if (moduletype != null && moduletype.GetInterface("ISitemap") != null) + if (moduletype != null && moduletype.GetInterface(nameof(ISitemap)) != null) { try { diff --git a/Oqtane.Server/Repository/ModuleDefinitionRepository.cs b/Oqtane.Server/Repository/ModuleDefinitionRepository.cs index f20c3d13..db20cd58 100644 --- a/Oqtane.Server/Repository/ModuleDefinitionRepository.cs +++ b/Oqtane.Server/Repository/ModuleDefinitionRepository.cs @@ -340,7 +340,7 @@ namespace Oqtane.Repository if (!string.IsNullOrEmpty(moduledefinition.ServerManagerType)) { Type servertype = Type.GetType(moduledefinition.ServerManagerType); - if (servertype != null && servertype.GetInterface("IPortable") != null) + if (servertype != null && servertype.GetInterface(nameof(IPortable)) != null) { moduledefinition.IsPortable = true; } diff --git a/Oqtane.Server/Repository/ModuleRepository.cs b/Oqtane.Server/Repository/ModuleRepository.cs index 4d4a7e4e..5885ae9c 100644 --- a/Oqtane.Server/Repository/ModuleRepository.cs +++ b/Oqtane.Server/Repository/ModuleRepository.cs @@ -107,7 +107,7 @@ namespace Oqtane.Repository if (moduledefinition.ServerManagerType != "") { Type moduletype = Type.GetType(moduledefinition.ServerManagerType); - if (moduletype != null && moduletype.GetInterface("IPortable") != null) + if (moduletype != null && moduletype.GetInterface(nameof(IPortable)) != null) { try { @@ -152,7 +152,7 @@ namespace Oqtane.Repository if (moduledefinition.ServerManagerType != "") { Type moduletype = Type.GetType(moduledefinition.ServerManagerType); - if (moduletype != null && moduletype.GetInterface("IPortable") != null) + if (moduletype != null && moduletype.GetInterface(nameof(IPortable)) != null) { try { diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index 37eba499..4e4ae06d 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -542,7 +542,7 @@ namespace Oqtane.Repository if (pageTemplateModule.Content != "" && moduleDefinition.ServerManagerType != "") { Type moduletype = Type.GetType(moduleDefinition.ServerManagerType); - if (moduletype != null && moduletype.GetInterface("IPortable") != null) + if (moduletype != null && moduletype.GetInterface(nameof(IPortable)) != null) { try {