Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
code liturgy | be2366eb83 | |
code liturgy | 1f7bbff842 | |
code liturgy | 61be6b226d |
Binary file not shown.
|
@ -15,6 +15,7 @@
|
|||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2" />
|
||||
<PackageReference Include="Sharp.Augeas" Version="1.1.0-g34c7ba4d4d" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ContentWithTargetPath Include="root\**">
|
||||
|
@ -28,7 +29,4 @@
|
|||
<TargetPath>lens\%(RecursiveDir)\%(Filename)%(Extension)</TargetPath>
|
||||
</ContentWithTargetPath>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Sharp.Augeas\Sharp.Augeas.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Sharp.Augeas
|
||||
namespace Sharp.Augeas.Test
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe partial struct AugSettings {
|
||||
|
||||
[MarshalAs(UnmanagedType.LPStr)] public string root;
|
||||
[MarshalAs(UnmanagedType.LPStr)] public string loadPath;
|
||||
[MarshalAs(UnmanagedType.LPStr)] internal string root;
|
||||
[MarshalAs(UnmanagedType.LPStr)] internal string loadPath;
|
||||
|
||||
public AugSettings(string _root, string _loadPath )
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ namespace Sharp.Augeas
|
|||
root = "NIL";
|
||||
loadPath = "NIL";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Sharp.Augeas.Test;
|
||||
using static Sharp.Augeas.AugeasExtern;
|
||||
|
||||
namespace Sharp.Augeas
|
||||
|
|
|
@ -2,6 +2,7 @@ using System.Numerics;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using Sharp.Augeas.Test;
|
||||
|
||||
namespace Sharp.Augeas
|
||||
{
|
||||
|
|
|
@ -19,15 +19,14 @@
|
|||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="libclAugeas.so">
|
||||
<Pack>true</Pack>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<PackageReference Update="Nerdbank.GitVersioning">
|
||||
<Version>3.5.109</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="libclAugeas.dylib">
|
||||
<Pack>true</Pack>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Include="libclAugeas.so">
|
||||
<Pack>true</Pack>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -3,7 +3,7 @@ namespace Sharp.Augeas;
|
|||
public class Argument : Node
|
||||
{
|
||||
|
||||
public string Value { get; set; }
|
||||
public string Value;
|
||||
|
||||
public bool SetValue(string newValue)
|
||||
{
|
||||
|
|
|
@ -4,14 +4,14 @@ namespace Sharp.Augeas;
|
|||
|
||||
public class Directive : Node
|
||||
{
|
||||
public string Value { get; set; }
|
||||
public List<Argument> Arguments { get; set; }
|
||||
public string Value;
|
||||
public List<Argument> Arguments;
|
||||
public bool HasArguments => Arguments.Count != 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for the directive.
|
||||
/// The first word is the directive value,
|
||||
/// the following words correspond to the arguments.
|
||||
/// Sets a new value for the directive using string literals
|
||||
/// The values are separated by spaces, the first value is the directive value,
|
||||
/// the other values are values corresponding to the arguments.
|
||||
/// </summary>
|
||||
/// <param name="newValue"></param>
|
||||
public void Set(string newValue)
|
||||
|
@ -31,7 +31,8 @@ public class Directive : Node
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value of this directivew without writing changes to the disk.
|
||||
/// Set the value of this directive.
|
||||
/// Note: This doesn't write any changes to disk.
|
||||
/// </summary>
|
||||
/// <param name="newValue">New value.</param>
|
||||
/// <returns></returns>
|
||||
|
|
|
@ -4,9 +4,9 @@ namespace Sharp.Augeas
|
|||
{
|
||||
public class SuperNode : Node
|
||||
{
|
||||
public List<Directive> Directives { get; set; }
|
||||
public List<Argument> Arguments { get; set; }
|
||||
public List<SuperNode> SuperNodes { get; set; }
|
||||
public List<Directive> Directives;
|
||||
public List<Argument> Arguments;
|
||||
public List<SuperNode> SuperNodes;
|
||||
|
||||
public SuperNode(Augeas augeas, string path, string id) : base(augeas, path)
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "1.3",
|
||||
"version": "1.1",
|
||||
"semVer1NumericIdentifierPadding": 1,
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/master$",
|
||||
|
|
Loading…
Reference in New Issue