Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(arcgis): overhaul of arcgis connector and converter patterns to enable data extraction #439

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,36 @@ public static void AddArcGIS(this IServiceCollection serviceCollection)
serviceCollection.AddConnectorUtils();
serviceCollection.AddDUI<ArcGISDocumentStore>();
serviceCollection.AddDUIView();

// Register bindings
serviceCollection.AddSingleton<IBinding, TestBinding>();
serviceCollection.AddSingleton<IBinding, ConfigBinding>();
serviceCollection.AddSingleton<IBinding, AccountBinding>();

serviceCollection.RegisterTopLevelExceptionHandler();

serviceCollection.AddSingleton<IBinding>(sp => sp.GetRequiredService<IBasicConnectorBinding>());
serviceCollection.AddSingleton<IBasicConnectorBinding, BasicConnectorBinding>();

serviceCollection.AddSingleton<IBinding, ArcGISSelectionBinding>();
serviceCollection.AddSingleton<IBinding, ArcGISSendBinding>();
serviceCollection.AddSingleton<IBinding, ArcGISReceiveBinding>();

serviceCollection.AddTransient<ISendFilter, ArcGISSelectionFilter>();
serviceCollection.AddScoped<IHostObjectBuilder, ArcGISHostObjectBuilder>();
serviceCollection.RegisterTopLevelExceptionHandler();
serviceCollection.AddSingleton(DefaultTraversal.CreateTraversalFunc());

// register send operation and dependencies
serviceCollection.AddSingleton<IBinding, ArcGISSendBinding>();
serviceCollection.AddScoped<SendOperation<MapMember>>();
serviceCollection.AddSingleton<IBinding, ArcGISSelectionBinding>();
serviceCollection.AddTransient<ISendFilter, ArcGISSelectionFilter>();
serviceCollection.AddScoped<ArcGISRootObjectBuilder>();
serviceCollection.AddScoped<IRootObjectBuilder<MapMember>, ArcGISRootObjectBuilder>();

serviceCollection.AddScoped<ArcGISLayerUnpacker>();
serviceCollection.AddScoped<ArcGISColorUnpacker>();
// register send conversion cache
serviceCollection.AddSingleton<ISendConversionCache, SendConversionCache>();

// register receive operation and dependencies
// serviceCollection.AddSingleton<IBinding, ArcGISReceiveBinding>(); // POC: disabled until receive code is refactored
serviceCollection.AddScoped<LocalToGlobalConverterUtils>();

serviceCollection.AddScoped<ArcGISColorManager>();
serviceCollection.AddScoped<MapMembersUtils>();
serviceCollection.AddScoped<IHostObjectBuilder, ArcGISHostObjectBuilder>();

// register send conversion cache
serviceCollection.AddSingleton<ISendConversionCache, SendConversionCache>();
serviceCollection.AddScoped<MapMembersUtils>();

// operation progress manager
serviceCollection.AddSingleton<IOperationProgressManager, OperationProgressManager>();
Expand Down
3 changes: 3 additions & 0 deletions Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
global using AC = ArcGIS.Core;
global using ACD = ArcGIS.Core.Data;
global using ADM = ArcGIS.Desktop.Mapping;
Loading
Loading