Added custom UIX debug bridge

This commit is contained in:
Yoshi Askharoun
2022-06-07 01:00:15 -05:00
parent 0999ee69bb
commit 61eef6ff9a
10 changed files with 228 additions and 5 deletions
+9
View File
@@ -4,6 +4,7 @@
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
// Assembly location: C:\Program Files\Zune\UIX.dll
using Microsoft.Iris.Debug;
using System;
using System.IO;
using System.IO.Pipes;
@@ -174,12 +175,19 @@ namespace Microsoft.Iris.Queues
}
}
#if ZUNE5
private static Bridge Bridge { get; } = new(OwlCore.Remoting.RemotingMode.Host);
#endif
/// <summary>
/// Sends a message via <see cref="debugPipe"/>
/// </summary>
/// <param name="message"></param>
public static void SendDebugMessage(string message)
{
#if ZUNE5
Bridge.LogDispatcher(message);
#else
if (Application.DebugSettings.OpenDebugPipe && DebugPipe.IsConnected && DebugPipe.CanWrite)
{
DebugPipe.WriteByte(0x01);
@@ -188,6 +196,7 @@ namespace Microsoft.Iris.Queues
DebugPipe.Write(buffer, 0, buffer.Length);
DebugPipe.Flush();
}
#endif
}
}
}
+11 -4
View File
@@ -12,12 +12,19 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\36MSApp1024.snk</AssemblyOriginatorKeyFile>
<Platforms>AnyCPU;x64;x86</Platforms>
<UseZune5>false</UseZune5>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UIX.Debug\UIX.Debug.csproj" />
<ProjectReference Include="..\UIX.RenderApi\UIX.RenderApi.csproj" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<UseZune5>true</UseZune5>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
<Reference Include="Accessibility" />
<Reference Include="System" />
@@ -39,8 +46,8 @@
<PackageReference Include="Vanara.PInvoke.Accessibility" Version="3.4.2" />
</ItemGroup>
<!--<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>-->
<PropertyGroup Condition=" '$(UseZune5)' == 'true' ">
<ApplicationVersion>5.0.0.0</ApplicationVersion>
<DefineConstants>$(DefineConstants);ZUNE5</DefineConstants>
</PropertyGroup>
</Project>