55 lines
1.9 KiB
C#
55 lines
1.9 KiB
C#
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using Plume.Interfaces.Services;
|
|
using Plume.Interfaces.WPF.Modules;
|
|
using Plume.Output;
|
|
using Plume.Perforce;
|
|
using Plume.Perforce.Service.Implementation;
|
|
|
|
namespace DjRedo.Next
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for App.xaml
|
|
/// </summary>
|
|
public partial class App
|
|
{
|
|
public App()
|
|
{
|
|
//System.AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
|
}
|
|
|
|
private readonly IDictionary<AssemblyName, Assembly> _loadedAssembly = new Dictionary<AssemblyName, Assembly>();
|
|
/*private System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
|
|
{
|
|
AssemblyName assemblyName = new AssemblyName(args.Name);
|
|
if (_loadedAssembly.ContainsKey(assemblyName))
|
|
{
|
|
return _loadedAssembly[assemblyName];
|
|
}
|
|
else if (args.Name.Contains("P4API"))
|
|
{
|
|
if (File.Exists("Ubisoft.P4API.DLL"))
|
|
{
|
|
Assembly result = Assembly.LoadFile(new FileInfo("Ubisoft.P4API.DLL").FullName);
|
|
_loadedAssembly.Add(assemblyName, result);
|
|
return result;
|
|
}
|
|
}
|
|
return null;
|
|
}*/
|
|
|
|
/// <inheritdoc />
|
|
protected override IEnumerable<WpfModuleInfo> SetupModules()
|
|
{
|
|
yield return new WpfModuleInfo(new OutputModule());
|
|
yield return new WpfModuleInfo(new PerforceModule(), new PerforceModuleSetup { DefaultPerforceHost = "p4-jd-data-mrc.ubisoft.org:1808" });
|
|
yield return new WpfModuleInfo(new DjRedoModule());
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override IEnumerable<IService> SetupServices()
|
|
{
|
|
yield return new PerforceService();
|
|
}
|
|
}
|
|
}
|