fix: allow Nitride.Temporal to be used twice
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
ddebc8e683
commit
d258e52697
1
Justfile
1
Justfile
|
@ -100,6 +100,7 @@ release-tag: release-setup
|
|||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
|
||||
git remote remove publish || true
|
||||
git remote add publish https://dmoonfire:$GITEA_TOKEN@src.mfgames.com/mfgames-cil/$(basename $(git config --get remote.origin.url))
|
||||
|
||||
for i in src/*/GitVersion.yml
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
|
|
|
@ -4,17 +4,32 @@ namespace MfGames.Nitride.Temporal.Setup;
|
|||
|
||||
public class NitrideTemporalModule : Module
|
||||
{
|
||||
private static bool loaded;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
// Make sure our module isn't loaded more than once. This can happen
|
||||
// if another module requires this one and the user adds this module
|
||||
// to customize settings.
|
||||
if (loaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
loaded = true;
|
||||
|
||||
// Make sure our module isn't loaded more than once.
|
||||
builder.RegisterOperators(this);
|
||||
builder.RegisterValidators(this);
|
||||
|
||||
builder.RegisterType<TimeService>()
|
||||
builder
|
||||
.RegisterType<TimeService>()
|
||||
.AsSelf()
|
||||
.SingleInstance();
|
||||
|
||||
builder.RegisterGeneric(typeof(SetInstantFromComponent<>))
|
||||
builder
|
||||
.RegisterGeneric(typeof(SetInstantFromComponent<>))
|
||||
.As(typeof(SetInstantFromComponent<>));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BuildCommand : Command, ICommandHandler
|
|||
this.Handler = this;
|
||||
|
||||
// Handle any injected arguments into the command line.
|
||||
foreach (IPipelineCommandOption? option in pipelineOptions)
|
||||
foreach (IPipelineCommandOption option in pipelineOptions)
|
||||
{
|
||||
this.AddOption(option.Option);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue