chore: cleanup
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ServiceRegistration.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\AutocadPolycurveToHostConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\MeshToHostConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\SpeckleFallbackToHostConversion.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Geometry\DataObjectConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolyline2dRawConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolyline3dRawConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\Raw\AutocadPolycurveToHostPolylineRawConverter.cs" />
|
||||
|
||||
+2
-4
@@ -7,9 +7,7 @@ using Speckle.Sdk.Models;
|
||||
namespace Speckle.Converters.Rhino7.ToHost.TopLevel;
|
||||
|
||||
[NameAndRankValue(nameof(DataObject), NameAndRankValueAttribute.SPECKLE_DEFAULT_RANK)]
|
||||
public class SpeckleFallbackToAutocadTopLevelConverter
|
||||
: IToHostTopLevelConverter,
|
||||
ITypedConverter<DataObject, List<(ADB.Entity a, Base b)>>
|
||||
public class DataObjectConverter : IToHostTopLevelConverter, ITypedConverter<DataObject, List<(ADB.Entity a, Base b)>>
|
||||
{
|
||||
private readonly ITypedConverter<SOG.Line, ADB.Line> _lineConverter;
|
||||
private readonly ITypedConverter<SOG.Polyline, ADB.Polyline3d> _polylineConverter;
|
||||
@@ -17,7 +15,7 @@ public class SpeckleFallbackToAutocadTopLevelConverter
|
||||
private readonly ITypedConverter<SOG.Arc, ADB.Arc> _arcConverter;
|
||||
private readonly ITypedConverter<SOG.Point, ADB.DBPoint> _pointConverter;
|
||||
|
||||
public SpeckleFallbackToAutocadTopLevelConverter(
|
||||
public DataObjectConverter(
|
||||
ITypedConverter<SOG.Line, ADB.Line> lineConverter,
|
||||
ITypedConverter<SOG.Polyline, ADB.Polyline3d> polylineConverter,
|
||||
ITypedConverter<SOG.Mesh, ADB.PolyFaceMesh> meshConverter,
|
||||
+1
-1
@@ -9,6 +9,6 @@
|
||||
<Import_RootNamespace>Speckle.Converters.RhinoShared</Import_RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)**\*.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ToHost\TopLevel\DataObjectConverter.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -49,6 +49,8 @@ public sealed class ConverterWithFallback : IRootToHostConverter
|
||||
}
|
||||
catch (ConversionNotSupportedException e)
|
||||
{
|
||||
// NOTE: `ConversionNotSupportedException` should not be an exception - we know what we can convert and what we can't; this is doubly true
|
||||
// on hot paths where we *know* that we will fallback to a display value anyway.
|
||||
_logger.LogInformation(e, "Attempt to find conversion for type {type} failed", type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user