2020-10-05 21:25:39 +02:00
|
|
|
|
using LibHac.Common.Keys;
|
|
|
|
|
using LibHac.Fs;
|
2020-08-24 08:35:00 +02:00
|
|
|
|
using LibHac.Fs.Fsa;
|
|
|
|
|
using LibHac.FsSrv;
|
|
|
|
|
|
|
|
|
|
namespace LibHac.Tests
|
|
|
|
|
{
|
|
|
|
|
public static class HorizonFactory
|
|
|
|
|
{
|
|
|
|
|
public static Horizon CreateBasicHorizon()
|
|
|
|
|
{
|
|
|
|
|
IFileSystem rootFs = new InMemoryFileSystem();
|
2021-04-29 03:24:59 +02:00
|
|
|
|
var keySet = new KeySet();
|
2020-08-24 08:35:00 +02:00
|
|
|
|
|
2021-04-29 03:24:59 +02:00
|
|
|
|
var defaultObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(rootFs, keySet);
|
2020-08-24 08:35:00 +02:00
|
|
|
|
|
|
|
|
|
var config = new FileSystemServerConfig();
|
|
|
|
|
config.FsCreators = defaultObjects.FsCreators;
|
|
|
|
|
config.DeviceOperator = defaultObjects.DeviceOperator;
|
|
|
|
|
config.ExternalKeySet = new ExternalKeySet();
|
2021-04-29 03:24:59 +02:00
|
|
|
|
config.KeySet = keySet;
|
2020-08-24 08:35:00 +02:00
|
|
|
|
|
2021-03-01 09:22:59 +01:00
|
|
|
|
Horizon horizon = LibHac.HorizonFactory.CreateWithFsConfig(new HorizonConfiguration(), config);
|
2020-08-24 08:35:00 +02:00
|
|
|
|
|
|
|
|
|
return horizon;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|