Add demo code to disassemble loaded markup

This commit is contained in:
Yoshi Askharoun
2024-01-31 23:46:15 -06:00
parent eabaa33bcf
commit cb834aa688
3 changed files with 16 additions and 1 deletions
@@ -484,9 +484,13 @@ namespace Microsoft.Zune.Shell
string source = "res://ZuneShellResources!Frame.uix#Frame";
_hWndSplashScreen = hWndSplashScreen;
_initializationFailsafe = new InitializationFailsafe();
Iris.Markup.MarkupSystem.NewMarkupLoaded += MarkupSystem_NewMarkupLoaded;
PerfTrace.PerfTrace.PERFTRACE_LAUNCHEVENT(PerfTrace.PerfTrace.LAUNCH_EVENT.REQUEST_UI_LOAD, 0U);
Application.Window.RequestLoad(source);
PerfTrace.PerfTrace.PERFTRACE_LAUNCHEVENT(PerfTrace.PerfTrace.LAUNCH_EVENT.REQUEST_UI_LOAD_COMPLETE, 0U);
CallbackOnUIThread callbackOnUiThread = new CallbackOnUIThread();
_appInitializationSequencer = new AppInitializationSequencer(new CorePhase2ReadyCallback(CorePhase3Ready));
_zuneLibrary = new ZuneLibrary();
@@ -531,6 +535,15 @@ namespace Microsoft.Zune.Shell
return num.Int;
}
private static void MarkupSystem_NewMarkupLoaded(object sender, Iris.Markup.LoadResult e)
{
if (e is not Iris.Markup.MarkupLoadResult loadResult)
return;
var dis = Iris.Asm.Disassembler.Load(loadResult);
var source = dis.Write();
}
private static void ErrorReportHandler(Error[] errors)
{
int num = 0;
+2
View File
@@ -33,6 +33,8 @@
<HintPath>C:\Program Files\Zune\ZuneDBApi.dll</HintPath>
</Reference>
<PackageReference Include="UIX.Asm" Version="0.0.1-beta" />
<PackageReference Include="StrixMusic.Sdk" Version="0.1.0-alpha" />
<Reference Include="StrixMusic.Cores.Storage">
<HintPath>..\libs\nuget\StrixMusic.Cores.Storage\StrixMusic.Cores.Storage.dll</HintPath>