Skip to content

Commit

Permalink
Restore compability
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed May 8, 2024
1 parent 278d550 commit 67f1d6a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ public void RegisterExtensions(IExtensionManager manager)
#endif
});
#if !REVIT2023_OR_GREATER
manager.Register("BuiltInCategory", context =>
{
return (BuiltInCategory) extension.Value.Id.IntegerValue;
});
manager.Register("BuiltInCategory", _ => (BuiltInCategory) _category.Id.IntegerValue);
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ResolveSet Resolve(Document context, string target, ParameterInfo[] param
return target switch
{
#if REVIT2025_OR_GREATER
nameof(IndependentTag.TagText) when RebarBendingDetail.IsBendingDetail(tag) =>
nameof(IndependentTag.TagText) when RebarBendingDetail.IsBendingDetail(_tag) =>
ResolveSet.Append(new NotSupportedException("RebarBendingDetail not supported. Revit API critical Exception")),
#endif
nameof(IndependentTag.CanLeaderEndConditionBeAssigned) => ResolveLeaderEndCondition(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,11 @@ namespace RevitLookup.Core.ComponentModel.Descriptors;

public sealed class SolidDescriptor : Descriptor, IDescriptorExtension, IDescriptorConnector
{
#if REVIT2023_OR_GREATER
private readonly Solid _solid;

#endif
public SolidDescriptor(Solid solid)
{
#if REVIT2023_OR_GREATER
_solid = solid;
#endif
Name = $"{solid.Volume.ToString(CultureInfo.InvariantCulture)} ft³";
}

Expand Down

0 comments on commit 67f1d6a

Please sign in to comment.