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:
Shaun Walker
2020-04-05 14:39:08 -04:00
committed by GitHub
parent 05de65d3a0
commit 02fde9cec3
43 changed files with 91 additions and 141 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
namespace Oqtane.Infrastructure.Interfaces
namespace Oqtane.Infrastructure
{
public interface IInstallationManager
{

View File

@ -3,7 +3,7 @@ using Oqtane.Enums;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Infrastructure.Interfaces
namespace Oqtane.Infrastructure
{
public interface ILogManager
{

View File

@ -1,7 +1,7 @@
using Oqtane.Models;
using System.Collections.Generic;
namespace Oqtane.Infrastructure.Interfaces
namespace Oqtane.Infrastructure
{
public interface ISiteTemplate
{

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using Oqtane.Models;
namespace Oqtane.Infrastructure.Interfaces
namespace Oqtane.Infrastructure
{
public interface ISyncManager
{

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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
{

View File

@ -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 + "\"}]";

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;