Skip to content

Commit

Permalink
[gh-1322] Potential deployment fix for .NET Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmind committed Jan 6, 2024
1 parent 557fe03 commit 3d750e0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 64 deletions.
61 changes: 33 additions & 28 deletions source/NetFramework/Server/MirrorSharp/MirrorSharpModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,39 @@
using MirrorSharp.Advanced;
using MirrorSharp.Advanced.EarlyAccess;
using SharpLab.Server.MirrorSharp.Guards;
using SharpLab.Server.Monitoring;

namespace SharpLab.Server.MirrorSharp {
[UsedImplicitly]
public class MirrorSharpModule : Module {
protected override void Load(ContainerBuilder builder) {
builder.RegisterType<SlowUpdate>()
.As<ISlowUpdateExtension>()
.SingleInstance();

builder.RegisterType<SetOptionsFromClient>()
.As<ISetOptionsFromClientExtension>()
.SingleInstance();

builder.RegisterType<CSharpCompilationGuard>()
.As<IRoslynCompilationGuard<CSharpCompilation>>()
.SingleInstance();

builder.RegisterType<VisualBasicCompilationGuard>()
.As<IRoslynCompilationGuard<VisualBasicCompilation>>()
.SingleInstance();

builder.RegisterType<RoslynCompilationGuard>()
.As<IRoslynCompilationGuard>()
.SingleInstance();

builder.RegisterType<RoslynSourceTextGuard>()
.As<IRoslynSourceTextGuard>()
.SingleInstance();
}
namespace SharpLab.Server.MirrorSharp;

[UsedImplicitly]
public class MirrorSharpModule : Module {
protected override void Load(ContainerBuilder builder) {
builder.RegisterType<MonitorExceptionLogger>()
.As<IExceptionLogger>()
.SingleInstance();

builder.RegisterType<SlowUpdate>()
.As<ISlowUpdateExtension>()
.SingleInstance();

builder.RegisterType<SetOptionsFromClient>()
.As<ISetOptionsFromClientExtension>()
.SingleInstance();

builder.RegisterType<CSharpCompilationGuard>()
.As<IRoslynCompilationGuard<CSharpCompilation>>()
.SingleInstance();

builder.RegisterType<VisualBasicCompilationGuard>()
.As<IRoslynCompilationGuard<VisualBasicCompilation>>()
.SingleInstance();

builder.RegisterType<RoslynCompilationGuard>()
.As<IRoslynCompilationGuard>()
.SingleInstance();

builder.RegisterType<RoslynSourceTextGuard>()
.As<IRoslynSourceTextGuard>()
.SingleInstance();
}
}
72 changes: 36 additions & 36 deletions source/Server/MirrorSharp/MirrorSharpModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@
using MirrorSharp.Advanced.EarlyAccess;
using SharpLab.Server.MirrorSharp.Guards;

namespace SharpLab.Server.MirrorSharp {
[UsedImplicitly]
public class MirrorSharpModule : Module {
protected override void Load(ContainerBuilder builder) {
builder.RegisterType<MonitorExceptionLogger>()
.As<IExceptionLogger>()
.SingleInstance();

builder.RegisterType<SlowUpdate>()
.As<ISlowUpdateExtension>()
.SingleInstance();

builder.RegisterType<SetOptionsFromClient>()
.As<ISetOptionsFromClientExtension>()
.SingleInstance();

builder.RegisterType<CSharpCompilationGuard>()
.As<IRoslynCompilationGuard<CSharpCompilation>>()
.SingleInstance();

builder.RegisterType<VisualBasicCompilationGuard>()
.As<IRoslynCompilationGuard<VisualBasicCompilation>>()
.SingleInstance();

builder.RegisterType<RoslynCompilationGuard>()
.As<IRoslynCompilationGuard>()
.SingleInstance();

builder.RegisterType<RoslynSourceTextGuard>()
.As<IRoslynSourceTextGuard>()
.SingleInstance();

builder.RegisterType<ConnectionSendViewer>()
.As<IConnectionSendViewer>()
.SingleInstance();
}
namespace SharpLab.Server.MirrorSharp;

[UsedImplicitly]
public class MirrorSharpModule : Module {
protected override void Load(ContainerBuilder builder) {
builder.RegisterType<MonitorExceptionLogger>()
.As<IExceptionLogger>()
.SingleInstance();

builder.RegisterType<SlowUpdate>()
.As<ISlowUpdateExtension>()
.SingleInstance();

builder.RegisterType<SetOptionsFromClient>()
.As<ISetOptionsFromClientExtension>()
.SingleInstance();

builder.RegisterType<CSharpCompilationGuard>()
.As<IRoslynCompilationGuard<CSharpCompilation>>()
.SingleInstance();

builder.RegisterType<VisualBasicCompilationGuard>()
.As<IRoslynCompilationGuard<VisualBasicCompilation>>()
.SingleInstance();

builder.RegisterType<RoslynCompilationGuard>()
.As<IRoslynCompilationGuard>()
.SingleInstance();

builder.RegisterType<RoslynSourceTextGuard>()
.As<IRoslynSourceTextGuard>()
.SingleInstance();

builder.RegisterType<ConnectionSendViewer>()
.As<IConnectionSendViewer>()
.SingleInstance();
}
}

0 comments on commit 3d750e0

Please sign in to comment.