Change project name
This commit is contained in:
parent
502e13687b
commit
cf74f616dc
|
@ -1,21 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
|
|
||||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
|
|
||||||
<PackageReference Include="coverlet.collector" Version="3.1.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\CodeLiturgy.Augeas\CodeLiturgy.Augeas.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
|
@ -1,9 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace CodeLiturgy.Augeas.Test;
|
|
||||||
|
|
||||||
public class PrintTests
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeLiturgy.Augeas", "CodeLiturgy.Augeas\CodeLiturgy.Augeas.csproj", "{EF5B5D3E-325C-4C43-AFF7-851873E76B46}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeLiturgy.Augeas.Test", "CodeLiturgy.Augeas.Test\CodeLiturgy.Augeas.Test.csproj", "{0F03F0AE-AE3F-410B-ADA2-EB8B7A94D058}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0F03F0AE-AE3F-410B-ADA2-EB8B7A94D058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0F03F0AE-AE3F-410B-ADA2-EB8B7A94D058}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0F03F0AE-AE3F-410B-ADA2-EB8B7A94D058}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0F03F0AE-AE3F-410B-ADA2-EB8B7A94D058}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sharp.Augeas", "Sharp.Augeas\Sharp.Augeas.csproj", "{EF5B5D3E-325C-4C43-AFF7-851873E76B46}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EF5B5D3E-325C-4C43-AFF7-851873E76B46}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -1,4 +1,4 @@
|
||||||
namespace CodeLiturgy.Augeas;
|
namespace Sharp.Augeas;
|
||||||
|
|
||||||
public static class AugFlags
|
public static class AugFlags
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace CodeLiturgy.Augeas.Test
|
namespace Sharp.Augeas.Test
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public unsafe partial struct AugSettings {
|
public unsafe partial struct AugSettings {
|
|
@ -1,11 +1,11 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using CodeLiturgy.Augeas.Test;
|
using Sharp.Augeas.Test;
|
||||||
using static CodeLiturgy.Augeas.AugeasExtern;
|
using static Sharp.Augeas.AugeasExtern;
|
||||||
using static CodeLiturgy.Augeas.AugFlags;
|
using static Sharp.Augeas.AugFlags;
|
||||||
|
|
||||||
namespace CodeLiturgy.Augeas
|
namespace Sharp.Augeas
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Augeas Core containing the settings of this instance.
|
/// Augeas Core containing the settings of this instance.
|
||||||
|
@ -21,7 +21,7 @@ namespace CodeLiturgy.Augeas
|
||||||
~Augeas()
|
~Augeas()
|
||||||
{
|
{
|
||||||
// Effectively free the pointer
|
// Effectively free the pointer
|
||||||
close_aug(_augeas);
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -56,6 +56,7 @@ namespace CodeLiturgy.Augeas
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadFile(string configurationFilePath)
|
public void LoadFile(string configurationFilePath)
|
||||||
{
|
{
|
||||||
|
if (_augeas == IntPtr.Zero) return;
|
||||||
load_file(_augeas, configurationFilePath);
|
load_file(_augeas, configurationFilePath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@ using System.Numerics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using CodeLiturgy.Augeas.Test;
|
using Sharp.Augeas.Test;
|
||||||
|
|
||||||
namespace CodeLiturgy.Augeas
|
namespace Sharp.Augeas
|
||||||
{
|
{
|
||||||
[SuppressUnmanagedCodeSecurity]
|
[SuppressUnmanagedCodeSecurity]
|
||||||
public static unsafe partial class AugeasExtern
|
public static unsafe partial class AugeasExtern
|
|
@ -1,5 +1,5 @@
|
||||||
using CodeLiturgy.Augeas;
|
using Sharp.Augeas;
|
||||||
using CodeLiturgy.Augeas.Test;
|
using Sharp.Augeas.Test;
|
||||||
|
|
||||||
var path = Environment.CurrentDirectory;
|
var path = Environment.CurrentDirectory;
|
||||||
var root = $"{path}/root/";
|
var root = $"{path}/root/";
|
||||||
|
@ -8,13 +8,12 @@ AugSettings augSettings = new AugSettings(root, "/opt/homebrew/share/augeas/lens
|
||||||
var augeas = new Augeas(augSettings);
|
var augeas = new Augeas(augSettings);
|
||||||
// Calling extern functions
|
// Calling extern functions
|
||||||
|
|
||||||
string clSiteMatchPath = "/files/etc/apache2/sites-available/00-ci.codeliturgy.com.conf/VirtualHost";
|
string clSiteMatchPath = "/files/etc/apache2/sites-available/00-ci.codeliturgy.com.conf";
|
||||||
string clSiteFilepath = "/etc/apache2/sites-available/00-ci.codeliturgy.com.conf";
|
|
||||||
|
|
||||||
//AugeasCore.Benchmark( () => augeasCore.PrintAugTree(clSiteMatchPath , clSiteFilepath), 10);
|
//AugeasCore.Benchmark( () => augeasCore.PrintAugTree(clSiteMatchPath , clSiteFilepath), 10);
|
||||||
//AugeasCore.Benchmark( () => augeasCore.PrintPreview(clSiteMatchPath , clSiteFilepath), 10);
|
//AugeasCore.Benchmark( () => augeasCore.PrintPreview(clSiteMatchPath , clSiteFilepath), 10);
|
||||||
|
|
||||||
augeas.LoadFile(clSiteFilepath);
|
augeas.LoadFile("/etc/apache2/sites-available/00-ci.codeliturgy.com.conf");
|
||||||
|
|
||||||
augeas.PrintAugTree(clSiteMatchPath);
|
augeas.PrintAugTree(clSiteMatchPath);
|
||||||
var tree = augeas.GetTree(clSiteMatchPath);
|
var tree = augeas.GetTree(clSiteMatchPath);
|
|
@ -7,7 +7,7 @@
|
||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<RootNamespace>CodeLiturgy.Augeas</RootNamespace>
|
<RootNamespace>Sharp.Augeas</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
|
@ -0,0 +1,7 @@
|
||||||
|
namespace Sharp.Augeas.Types;
|
||||||
|
|
||||||
|
public class AugArg<T>
|
||||||
|
{
|
||||||
|
public string Value;
|
||||||
|
public T Parent;
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
namespace Sharp.Augeas.Types;
|
||||||
|
|
||||||
|
public interface IAugConfig{};
|
||||||
|
|
||||||
|
public interface IArg { };
|
||||||
|
|
||||||
|
public interface IProxyData { };
|
||||||
|
|
||||||
|
public interface IVirtualHostData { };
|
||||||
|
|
||||||
|
public interface IDirectiveArg<T> : IArg { }
|
||||||
|
|
||||||
|
public interface IProxyArg : IArg, IProxyData { }
|
||||||
|
|
||||||
|
public interface IDirectiveConfig<T> : IAugConfig { }
|
||||||
|
|
||||||
|
public interface IVirtualHostConfig : IAugConfig { }
|
||||||
|
|
||||||
|
public interface IVirtualHostArg : IArg, IVirtualHostData { };
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace Sharp.Augeas.VirtualHost;
|
||||||
|
|
||||||
|
public class DirectiveArg
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace Sharp.Augeas.VirtualHost;
|
||||||
|
|
||||||
|
public class ProxyArg
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace Sharp.Augeas.VirtualHost;
|
||||||
|
|
||||||
|
public class ProxyDirective
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace Sharp.Augeas.VirtualHost;
|
||||||
|
|
||||||
|
public class VirtualHostArg
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace Sharp.Augeas.VirtualHost;
|
||||||
|
|
||||||
|
public class VirtualHostDirective
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -7,7 +7,8 @@ DESTIN=$SCRIPT_DIR/bin/Debug/net6.0
|
||||||
# Set the $CLAUG_LIB_PATH to the PATH where the claugeas library is located before running this script
|
# Set the $CLAUG_LIB_PATH to the PATH where the claugeas library is located before running this script
|
||||||
|
|
||||||
if [[ -z "${CLAUG_LIB_PATH}" ]]; then
|
if [[ -z "${CLAUG_LIB_PATH}" ]]; then
|
||||||
echo "set the CLAUG_LIB_PATH in the ${LIB_FILE} location."
|
echo "error: set the CLAUG_LIB_PATH in the ${LIB_FILE} location."
|
||||||
|
echo
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue