Skip to content

Commit

Permalink
PR builds (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock authored Jul 4, 2024
1 parent ce815aa commit 3cbed42
Show file tree
Hide file tree
Showing 51 changed files with 1,992 additions and 384 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\2023\Speckle.Converters.Autocad2023.DependencyInjection\Speckle.Converters.Autocad2023.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2023.DependencyInjection\Speckle.Converters.Autocad2023.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Autofac\Speckle.Autofac.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj" />
Expand All @@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,69 +1,21 @@
#if AUTOCAD
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Autofac;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.Filters;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Interfaces;
using Speckle.Connectors.Autocad.Operations.Receive;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Autocad.Plugin;
using Speckle.Connectors.DUI;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.WebView;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Instances;
using Speckle.Connectors.Utils.Operations;
using Speckle.Core.Models.GraphTraversal;

namespace Speckle.Connectors.Autocad.DependencyInjection;

public class AutocadConnectorModule : ISpeckleModule
{
public void Load(SpeckleContainerBuilder builder)
{
builder.AddAutofac();
builder.AddConnectorUtils();
builder.AddDUI();
builder.AddDUIView();

// Register other connector specific types
builder.AddSingleton<IAutocadPlugin, AutocadPlugin>();
builder.AddTransient<TransactionContext>();
builder.AddSingleton(new AutocadDocumentManager()); // TODO: Dependent to TransactionContext, can be moved to AutocadContext
builder.AddSingleton<DocumentModelStore, AutocadDocumentStore>();
builder.AddSingleton<AutocadContext>();
builder.AddSingleton<AutocadIdleManager>();

SharedConnectorModule.LoadShared(builder);


builder.AddScoped<AutocadLayerManager>();
SharedRegistration.Load(builder);

// Operations
builder.AddScoped<SendOperation<AutocadRootObject>>();
builder.AddSingleton(DefaultTraversal.CreateTraversalFunc());

// Object Builders
builder.AddScoped<IHostObjectBuilder, AutocadHostObjectBuilder>();
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();
SharedRegistration.LoadSend(builder);
SharedRegistration.LoadReceive(builder);

// Register bindings
builder.AddSingleton<IBinding, ConfigBinding>("connectorName", "Autocad"); // POC: Easier like this for now, should be cleaned up later
builder.AddSingleton<IBinding, AutocadSendBinding>();
builder.AddSingleton<IBinding, AutocadReceiveBinding>();

// register send filters
builder.AddTransient<ISendFilter, AutocadSelectionFilter>();

// register send conversion cache
builder.AddSingleton<ISendConversionCache, SendConversionCache>();
builder.AddScoped<IInstanceObjectsManager<AutocadRootObject, List<Entity>>, AutocadInstanceObjectManager>();
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
#if CIVIL3D

using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.Filters;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Operations;

namespace Speckle.Connectors.Autocad.DependencyInjection;

public class Civil3dConnectorModule : ISpeckleModule
{
public void Load(SpeckleContainerBuilder builder)
{
SharedConnectorModule.LoadShared(builder);

// Operations
builder.AddScoped<SendOperation<AutocadRootObject>>();

// Object Builders
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();

SharedRegistration.Load(builder);
SharedRegistration.LoadSend(builder);

// Register bindings
builder.AddSingleton<IBinding, ConfigBinding>("connectorName", "Civil3d"); // POC: Easier like this for now, should be cleaned up later
builder.AddSingleton<IBinding, AutocadSendBinding>();

// register send filters
builder.AddTransient<ISendFilter, AutocadSelectionFilter>();

// register send conversion cache
builder.AddSingleton<ISendConversionCache, SendConversionCache>();
}
}
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Autofac;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Interfaces;
using Speckle.Connectors.Autocad.Plugin;
using Speckle.Connectors.DUI;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.WebView;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Autocad.Filters;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Operations;
using Speckle.Connectors.Utils.Instances;
using Speckle.Connectors.Autocad.Operations.Receive;

using Speckle.Core.Models.GraphTraversal;

namespace Speckle.Connectors.Autocad.DependencyInjection;

public static class SharedRegistration
{
public static void Load(SpeckleContainerBuilder builder)
{
builder.AddAutofac();
builder.AddConnectorUtils();
builder.AddDUI();
builder.AddDUIView();

// Register other connector specific types
builder.AddSingleton<IAutocadPlugin, AutocadPlugin>();
builder.AddTransient<TransactionContext>();
builder.AddSingleton(new AutocadDocumentManager()); // TODO: Dependent to TransactionContext, can be moved to AutocadContext
builder.AddSingleton<DocumentModelStore, AutocadDocumentStore>();
builder.AddSingleton<AutocadContext>();
builder.AddScoped<AutocadLayerManager>();
builder.AddSingleton<AutocadIdleManager>();

// Register bindings
builder.AddSingleton<IBinding, TestBinding>();
builder.AddSingleton<IBinding, AccountBinding>();
builder.AddSingleton<IBinding, AutocadBasicConnectorBinding>();
builder.AddSingleton<IBasicConnectorBinding, AutocadBasicConnectorBinding>();
builder.AddSingleton<IBinding, AutocadSelectionBinding>();
}

public static void LoadSend(SpeckleContainerBuilder builder)
{
// Operations
builder.AddScoped<SendOperation<AutocadRootObject>>();

// Object Builders
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();

// Register bindings
builder.AddSingleton<IBinding, AutocadSendBinding>();

// register send filters
builder.AddTransient<ISendFilter, AutocadSelectionFilter>();

// register send conversion cache
builder.AddSingleton<ISendConversionCache, SendConversionCache>();
builder.AddScoped<IInstanceObjectsManager<AutocadRootObject, List<Entity>>, AutocadInstanceObjectManager>();
}

public static void LoadReceive(SpeckleContainerBuilder builder)
{
// traversal
builder.AddSingleton(DefaultTraversal.CreateTraversalFunc());

// Object Builders
builder.AddScoped<IHostObjectBuilder, AutocadHostObjectBuilder>();

// Register bindings
builder.AddSingleton<IBinding, AutocadReceiveBinding>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadReceiveBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadSendBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadBasicConnectorBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\SharedConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\SharedRegistration.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\AutocadConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\Civil3dConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Filters\AutocadSelectionFilter.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Speckle.Connectors.Civil3d</RootNamespace>
<TargetFramework>net48</TargetFramework>
Expand All @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\2024\Speckle.Converters.Autocad2024.DependencyInjection\Speckle.Converters.Autocad2024.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2024.DependencyInjection\Speckle.Converters.Civil3d2024.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Autofac\Speckle.Autofac.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj" />
Expand All @@ -19,7 +19,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Speckle.Civil3D.API" />
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0"/>
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2024.0.0"/>
</ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.AutoCAD.API": {
"type": "Direct",
"requested": "[2024.0.0, )",
"resolved": "2024.0.0",
"contentHash": "pZZ5uI+NXhZaQnsqRkgp/rywqBAjDObDJ9XNFGJvemT5k2OthDpHzlK/mKxz8QDCYie7uImQ8dv3uWj2QUFDPw=="
},
"Speckle.Civil3D.API": {
"type": "Direct",
"requested": "[2024.0.0, )",
Expand Down Expand Up @@ -437,8 +443,8 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Connectors.Utils": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
Expand All @@ -447,44 +453,45 @@
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.autocad2024": {
"speckle.converters.civil3d2024": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2024.0.0, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Civil3D.API": "[2024.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.autocad2024.dependencyinjection": {
"speckle.converters.civil3d2024.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.Autocad2024": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
"Speckle.Converters.Civil3d2024": "[1.0.0, )",
"Speckle.Converters.Common.DependencyInjection": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"Autofac": {
Expand Down Expand Up @@ -512,12 +519,6 @@
"Serilog": "2.12.0"
}
},
"Speckle.AutoCAD.API": {
"type": "CentralTransitive",
"requested": "[2023.0.0, )",
"resolved": "2024.0.0",
"contentHash": "pZZ5uI+NXhZaQnsqRkgp/rywqBAjDObDJ9XNFGJvemT5k2OthDpHzlK/mKxz8QDCYie7uImQ8dv3uWj2QUFDPw=="
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Sdk\Speckle.Converters.Common.DependencyInjection\Speckle.Converters.Common.DependencyInjection.csproj" />
<ProjectReference Include="..\Speckle.Converters.Autocad2023\Speckle.Converters.Autocad2023.csproj" />
<PackageReference Include="Autofac" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common.DependencyInjection\Speckle.Converters.Common.DependencyInjection.csproj" />
<ProjectReference Include="..\Speckle.Converters.Autocad2023\Speckle.Converters.Autocad2023.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -367,21 +367,21 @@
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2023.0.0, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>

<Import Project="..\..\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems" Label="Shared" />

</Project>
Loading

0 comments on commit 3cbed42

Please sign in to comment.