Skip to content

Commit

Permalink
fix IOC and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Jun 27, 2024
1 parent df9da25 commit 0557fd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@ namespace Speckle.Converters.RevitShared.ToSpeckle;
// CNX-9414 Re-evaluate hosted element conversions
public class HostedElementConversionToSpeckle
{
private readonly ToSpeckleConvertedObjectsCache _convertedObjectsCache;
private readonly IRootToSpeckleConverter _converter;
private readonly IRevitConversionContextStack _contextStack;

public HostedElementConversionToSpeckle(
ToSpeckleConvertedObjectsCache convertedObjectsCache,
IRootToSpeckleConverter converter,
IRevitConversionContextStack contextStack
)
public HostedElementConversionToSpeckle(IRootToSpeckleConverter converter, IRevitConversionContextStack contextStack)
{
_convertedObjectsCache = convertedObjectsCache;
_converter = converter;
_contextStack = contextStack;
}
Expand Down
9 changes: 2 additions & 7 deletions DUI3-DX/Sdk/Speckle.Connectors.Utils/ContainerRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ public static void AddConnectorUtils(this SpeckleContainerBuilder builder)
var serilogLogger = SpeckleLog.Logger;

ILoggerFactory loggerFactory = new LoggerFactory().AddSerilog(serilogLogger);
builder.ContainerBuilder.Register(_ =>loggerFactory)
.As<ILoggerFactory>()
.SingleInstance()
.AutoActivate();
builder.ContainerBuilder.Register(_ => loggerFactory).As<ILoggerFactory>().SingleInstance().AutoActivate();

builder.ContainerBuilder.RegisterGeneric(typeof(Logger<>))
.As(typeof(ILogger<>))
.SingleInstance();
builder.ContainerBuilder.RegisterGeneric(typeof(Logger<>)).As(typeof(ILogger<>)).SingleInstance();
builder.AddSingleton(loggerFactory);
}
}

0 comments on commit 0557fd5

Please sign in to comment.