rolled back change creating an Infrastructure.Interfaces namespace, modified IModule interface to be strongly typed (#343)
* upgrade to .NET Core 3.2 Preview 3 and fixes for issues created by #314 * Components based on Bootstrap4 for Sections and TabStrip to increase productivity and promote uniformity in Module UIs * rolled back change creating an Infrastructure.Interfaces namespace, modified IModule interface to be strongly typed
This commit is contained in:
@ -8,7 +8,7 @@ using System;
|
||||
using System.Net;
|
||||
using System.Globalization;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -14,7 +14,7 @@ using System.Linq;
|
||||
using System.Drawing;
|
||||
using System.Net;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||
|
@ -6,7 +6,7 @@ using Oqtane.Shared;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
|
||||
|
@ -4,7 +4,6 @@ using Microsoft.Extensions.Configuration;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
|
||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||
|
||||
|
@ -7,7 +7,7 @@ using System;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -2,7 +2,7 @@
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Shared;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using System.Linq;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Reflection;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
using System;
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
|
||||
|
@ -7,7 +7,7 @@ using System.Linq;
|
||||
using Oqtane.Security;
|
||||
using System.Net;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -5,7 +5,7 @@ using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using System.Linq;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -5,7 +5,7 @@ using Oqtane.Shared;
|
||||
using Oqtane.Security;
|
||||
using System.Linq;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -5,7 +5,7 @@ using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using System.Linq;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Enums;
|
||||
using System.Data.SqlClient;
|
||||
|
@ -4,7 +4,7 @@ using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -8,7 +8,7 @@ using System.Reflection;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||
|
@ -11,7 +11,7 @@ using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Net;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Controllers
|
||||
|
@ -7,7 +7,6 @@ using System.Xml;
|
||||
using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Oqtane.Infrastructure.Interfaces
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
public interface IInstallationManager
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using Oqtane.Enums;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Infrastructure.Interfaces
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
public interface ILogManager
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Oqtane.Infrastructure.Interfaces
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
public interface ISiteTemplate
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Infrastructure.Interfaces
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
public interface ISyncManager
|
||||
{
|
||||
|
@ -6,7 +6,6 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
// ReSharper disable StringIndexOfIsCultureSpecific.2
|
||||
|
@ -1,5 +1,5 @@
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Repository;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
@ -3,7 +3,7 @@ using Oqtane.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
|
@ -7,7 +7,7 @@ using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
|
||||
namespace Oqtane.Modules.HtmlText.Controllers
|
||||
{
|
||||
|
@ -148,50 +148,22 @@ namespace Oqtane.Repository
|
||||
if (moduletype != null)
|
||||
{
|
||||
var moduleobject = Activator.CreateInstance(moduletype);
|
||||
Dictionary<string, string> properties = (Dictionary<string, string>)moduletype.GetProperty("Properties").GetValue(moduleobject);
|
||||
moduledefinition = new ModuleDefinition
|
||||
{
|
||||
ModuleDefinitionName = qualifiedModuleType,
|
||||
Name = GetProperty(properties, "Name"),
|
||||
Description = GetProperty(properties, "Description"),
|
||||
Categories = GetProperty(properties, "Categories"),
|
||||
Version = GetProperty(properties, "Version"),
|
||||
Owner = GetProperty(properties, "Owner"),
|
||||
Url = GetProperty(properties, "Url"),
|
||||
Contact = GetProperty(properties, "Contact"),
|
||||
License = GetProperty(properties, "License"),
|
||||
Dependencies = GetProperty(properties, "Dependencies"),
|
||||
PermissionNames = GetProperty(properties, "PermissionNames"),
|
||||
ServerAssemblyName = GetProperty(properties, "ServerAssemblyName"),
|
||||
ControlTypeTemplate = moduleType + "." + Constants.ActionToken + ", " + typename[1],
|
||||
ControlTypeRoutes = "",
|
||||
AssemblyName = assembly.FullName.Split(",")[0],
|
||||
Permissions = ""
|
||||
};
|
||||
moduledefinition = (ModuleDefinition)moduletype.GetProperty("ModuleDefinition").GetValue(moduleobject);
|
||||
}
|
||||
else
|
||||
{
|
||||
moduledefinition = new ModuleDefinition
|
||||
{
|
||||
ModuleDefinitionName = qualifiedModuleType,
|
||||
Name = moduleType.Substring(moduleType.LastIndexOf(".") + 1),
|
||||
Description = moduleType.Substring(moduleType.LastIndexOf(".") + 1),
|
||||
Categories = ((qualifiedModuleType.StartsWith("Oqtane.Modules.Admin.")) ? "Admin" : ""),
|
||||
Version = new Version(1, 0, 0).ToString(),
|
||||
Owner = "",
|
||||
Url = "",
|
||||
Contact = "",
|
||||
License = "",
|
||||
Dependencies = "",
|
||||
PermissionNames = "",
|
||||
ServerAssemblyName = "",
|
||||
ControlTypeTemplate = moduleType + "." + Constants.ActionToken + ", " + typename[1],
|
||||
ControlTypeRoutes = "",
|
||||
AssemblyName = assembly.FullName.Split(",")[0],
|
||||
Permissions = ""
|
||||
Version = new Version(1, 0, 0).ToString()
|
||||
};
|
||||
}
|
||||
// permissions
|
||||
// set internal properties
|
||||
moduledefinition.ModuleDefinitionName = qualifiedModuleType;
|
||||
moduledefinition.ControlTypeTemplate = moduleType + "." + Constants.ActionToken + ", " + typename[1];
|
||||
moduledefinition.AssemblyName = assembly.FullName.Split(",")[0];
|
||||
if (moduledefinition.Categories == "Admin")
|
||||
{
|
||||
moduledefinition.Permissions = "[{\"PermissionName\":\"Utilize\",\"Permissions\":\"" + Constants.AdminRole + "\"}]";
|
||||
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Oqtane.Extensions;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Modules;
|
||||
using Oqtane.Shared;
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Repository
|
||||
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Oqtane.Enums;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Security
|
||||
|
@ -15,7 +15,6 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Repository;
|
||||
using Oqtane.Security;
|
||||
using Oqtane.Services;
|
||||
|
Reference in New Issue
Block a user