Removed dead code

This commit is contained in:
Yoshi Askharoun
2022-06-03 01:35:01 -05:00
parent ef5de4ca94
commit 5ea2bfdc25
2 changed files with 1 additions and 33 deletions
+1 -32
View File
@@ -1,7 +1,5 @@
using Silk.NET.Windowing; using System;
using System;
using System.IO; using System.IO;
using System.Reflection;
using System.Threading; using System.Threading;
namespace ZuneHost namespace ZuneHost
@@ -33,7 +31,6 @@ namespace ZuneHost
File.Copy(file, targetPath); File.Copy(file, targetPath);
} }
} }
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Console.WriteLine("Starting Zune..."); Console.WriteLine("Starting Zune...");
@@ -43,34 +40,6 @@ namespace ZuneHost
})); }));
zuneThread.SetApartmentState(ApartmentState.STA); zuneThread.SetApartmentState(ApartmentState.STA);
zuneThread.Start(); zuneThread.Start();
//Thread t = new(() =>
// Microsoft.Zune.Shell.ZuneApplication.Launch(strArgs, IntPtr.Zero));
//t.SetApartmentState(ApartmentState.STA);
//t.Start();
}
private static Assembly? CurrentDomain_AssemblyResolve(object? sender, ResolveEventArgs args)
{
string fileName = args.Name[..args.Name.IndexOf(",")];
if (fileName == "ZuneDBApi")
{
string assemblyPath = Path.Combine(Directory.GetCurrentDirectory(), "ZuneDBApi.dll");
bool exists = File.Exists(assemblyPath);
return Assembly.LoadFrom(assemblyPath);
}
else if (!fileName.StartsWith("Zune"))
{
return null;
}
else
{
string assemblyPath = Path.Combine(
_zuneProgramFolder ?? throw new ArgumentNullException(),
fileName + ".dll");
return Assembly.Load(assemblyPath);
}
} }
} }
} }
-1
View File
@@ -10,7 +10,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Silk.NET.Windowing" Version="2.15.0" />
<ProjectReference Include="..\ZuneShell\ZuneShell.csproj" /> <ProjectReference Include="..\ZuneShell\ZuneShell.csproj" />
</ItemGroup> </ItemGroup>