Small updates to fix warnings + default top level statements

This commit is contained in:
Niels Kooiman
2024-07-04 11:27:11 +02:00
parent 6b07b08027
commit cd82a7ccc2
3 changed files with 12 additions and 14 deletions

4
files/.editorconfig Normal file
View File

@@ -0,0 +1,4 @@
[*.cs]
# CS8714: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
dotnet_diagnostic.CS8714.severity = none

View File

@@ -4,11 +4,11 @@ using Domain;
namespace Wiring
{
public class Wiring : IAdapterResolver, IDisposable
public class DomainWiring : IAdapterResolver, IDisposable
{
private readonly IContainer _container;
public Wiring()
public DomainWiring()
{
_container = Wire();
DomainPorts.SetResolver(this);
@@ -44,16 +44,9 @@ namespace Wiring
// builder.RegisterType<CacheService>().As<ICacheService>().SingleInstance();
}
public T Resolve<T>()
{
return _container.Resolve<T>();
}
public void Dispose()
{
if (_container != null) {
_container.Dispose();
}
}
public T Resolve<T>() => _container.Resolve<T>();
public void Dispose() => _container?.Dispose();
}
}