Add OS-specific interop
This commit is contained in:
parent
86c7f89788
commit
aea8c11dc4
33 changed files with 1083 additions and 13 deletions
25
Source/LoadByOS/MacOSConfigApp/MacOSConfigApp.csproj
Normal file
25
Source/LoadByOS/MacOSConfigApp/MacOSConfigApp.csproj
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<OutputPath>..\..\bin\Avalonia\Debug</OutputPath>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<OutputPath>..\..\bin\Avalonia\Release</OutputPath>
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\AppScaffolding\AppScaffolding.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
28
Source/LoadByOS/MacOSConfigApp/MacOSInterop.cs
Normal file
28
Source/LoadByOS/MacOSConfigApp/MacOSInterop.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using AppScaffolding.OSInterop;
|
||||
|
||||
namespace MacOSConfigApp
|
||||
{
|
||||
internal class MacOSInterop : IInteropFunctions
|
||||
{
|
||||
public MacOSInterop() { }
|
||||
public MacOSInterop(params object[] values) { }
|
||||
|
||||
|
||||
// examples until the real interface is filled out
|
||||
private string InitValue1 { get; }
|
||||
private int InitValue2 { get; }
|
||||
|
||||
public MacOSInterop(string initValue1, int initValue2)
|
||||
{
|
||||
InitValue1 = initValue1;
|
||||
InitValue2 = initValue2;
|
||||
}
|
||||
|
||||
public string TransformInit1() => InitValue1.ToLower();
|
||||
|
||||
public int TransformInit2() => InitValue2 + InitValue2;
|
||||
|
||||
public void CopyTextToClipboard(string text) => throw new PlatformNotSupportedException();
|
||||
public void ShowForm() => throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
11
Source/LoadByOS/MacOSConfigApp/Program.cs
Normal file
11
Source/LoadByOS/MacOSConfigApp/Program.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using AppScaffolding.OSInterop;
|
||||
|
||||
namespace MacOSConfigApp
|
||||
{
|
||||
class Program : OSConfigBase
|
||||
{
|
||||
public override Type InteropFunctionsType => typeof(MacOSInterop);
|
||||
|
||||
static void Main() => new Program().Run();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue