LibHac/tests/LibHac.Tests/HorizonFactory.cs
2021-02-07 00:26:20 -07:00

26 lines
787 B
C#

using LibHac.Common.Keys;
using LibHac.Fs;
using LibHac.Fs.Fsa;
using LibHac.FsSrv;
namespace LibHac.Tests
{
public static class HorizonFactory
{
public static Horizon CreateBasicHorizon()
{
IFileSystem rootFs = new InMemoryFileSystem();
var defaultObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(rootFs, new KeySet());
var config = new FileSystemServerConfig();
config.FsCreators = defaultObjects.FsCreators;
config.DeviceOperator = defaultObjects.DeviceOperator;
config.ExternalKeySet = new ExternalKeySet();
Horizon horizon = LibHac.HorizonFactory.CreateWithFsConfig(new StopWatchTimeSpanGenerator(), config);
return horizon;
}
}
}