704a75a2b4
* splits autocad and civil registration for root object builder * Update Speckle.Connectors.AutocadShared.projitems * adds civil top level converter * add civil3d connector * fixes as was on wrong branch * fixed solution for new shared project * default registration for autocad/civil * some fixes * moved classes around * adds basic civil element converter * csharpier reformat * removes units from root collection, restructures civil shared project * Update AutocadConnectorModule.cs * refactors root object builder to be abstract * removes unnecessary usings --------- Co-authored-by: Adam Hathcock <adam@hathcock.uk>
31 lines
916 B
C#
31 lines
916 B
C#
#if AUTOCAD
|
|
using System.Reflection;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Speckle.Connectors.Autocad.Bindings;
|
|
using Speckle.Connectors.Autocad.Operations.Send;
|
|
using Speckle.Connectors.Common.Builders;
|
|
using Speckle.Connectors.DUI.Bindings;
|
|
using Speckle.Sdk;
|
|
|
|
namespace Speckle.Connectors.Autocad.DependencyInjection;
|
|
|
|
public static class AutocadConnectorModule
|
|
{
|
|
public static void AddAutocad(this IServiceCollection serviceCollection)
|
|
{
|
|
serviceCollection.AddAutocadBase();
|
|
|
|
// Send
|
|
serviceCollection.LoadSend();
|
|
serviceCollection.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();
|
|
|
|
// Receive
|
|
serviceCollection.LoadReceive();
|
|
|
|
// Register vertical specific bindings
|
|
serviceCollection.AddSingleton<IBinding, AutocadSendBinding>();
|
|
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
|
|
}
|
|
}
|
|
#endif
|