Initial commit

This commit is contained in:
2025-05-10 20:37:54 +02:00
commit 51e854364f
16 changed files with 438 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Bring2mind.DnnConnect2025Demo.SysMonitor</AssemblyName>
<TargetFramework>net48</TargetFramework>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<Authors>Peter Donker</Authors>
<Company>Bring2mind</Company>
<Product>dnnconnect2025demo</Product>
<Copyright>Copyright 2025 by Bring2mind</Copyright>
<PackageId>DnnConnect2025Demo</PackageId>
<AssemblyVersion>0.0.1</AssemblyVersion>
<FileVersion>0.0.1</FileVersion>
<Description>DnnConnect2025Demo module</Description>
<NeutralLanguage>en-US</NeutralLanguage>
<ApplicationIcon />
<OutputType>Library</OutputType>
<StartupObject />
<DebugType>Portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetNuke.Abstractions" Version="10.0.0" />
<PackageReference Include="DotNetNuke.Core" Version="10.0.0" />
<PackageReference Include="DotNetNuke.WebApi" Version="10.0.0" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Web" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
using DotNetNuke.Application;
using DotNetNuke.Web.Api;
using System.IO;
using System.Net.Http;
using System.Net;
using System.Web.Http;
namespace Bring2mind.DnnConnect2025Demo.SysMonitor
{
public class SysController
{
}
}

View File

@@ -0,0 +1,40 @@
using System.IO;
namespace Bring2mind.DnnConnect2025Demo.SysMonitor
{
internal class SysMethods
{
public static string GetWebConfigMd5(string webConfigPath)
{
var fileBytes = File.ReadAllBytes(webConfigPath);
var md5 = System.Security.Cryptography.MD5.Create();
var hash = md5.ComputeHash(fileBytes);
var md5String = System.BitConverter.ToString(hash).Replace("-", "").ToLower();
return md5String;
}
public static bool IsDirectoryWritable(string dirPath, bool throwIfFails = false)
{
try
{
using (FileStream fs = File.Create(
Path.Combine(
dirPath,
Path.GetRandomFileName()
),
1,
FileOptions.DeleteOnClose)
)
{ }
return true;
}
catch
{
if (throwIfFails)
throw;
else
return false;
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"projectType": "library",
"name": "Bring2mind_SysMonitor",
"friendlyName": "Bring2mind SysMonitor",
"description": "Bring2mind SysMonitor Library",
"packageName": "Bring2mind_SysMonitor",
"folder": "Bring2mind/SysMonitor",
"library": {},
"pathsAndFiles": {
"pathToAssemblies": "./bin",
"pathToScripts": "./Server/SqlScripts",
"assemblies": ["Bring2mind.DnnConnect2025Demo.SysMonitor.dll"],
"releaseFiles": [],
"zipName": "Bring2mind.SysMonitor"
}
}