mfgames-cil/src/MfGames.Nitride.Exec/Setup/NitrideExecBuilderExtensions.cs

21 lines
544 B
C#

namespace MfGames.Nitride.Exec.Setup;
public static class NitrideExecBuilderExtensions
{
private static bool loaded;
public static NitrideBuilder UseExec(this NitrideBuilder builder)
{
// If we've already loaded, then we have a problem.
if (loaded)
{
throw new InvalidOperationException("Cannot use UseExec() more than once.");
}
loaded = true;
// Get the configuration so we can set the various options.
return builder.UseModule<NitrideExecModule>();
}
}