Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed Jun 19, 2023
1 parent c2a8260 commit 54609c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ public void RegisterExtensions(IExtensionManager manager)
extension.Result = extension.Value.AsColor();
});

if (manager.Context is { IsFamilyDocument: true })
if (manager.Context.IsFamilyDocument)
{
manager.Register(_parameter, extension =>
{
extension.Name = nameof(FamilyManager.GetAssociatedFamilyParameter);
extension.Result = extension.Context.FamilyManager.GetAssociatedFamilyParameter(extension.Value);
});
}
}

public ResolveSet Resolve(Document context, string target, ParameterInfo[] parameters)
Expand Down
1 change: 0 additions & 1 deletion RevitLookup/Core/Contracts/IExtensionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ namespace RevitLookup.Core.Contracts;
public interface IExtensionManager
{
Document Context { get; }

void Register<T>(T value, Action<DescriptorExtension<T>> extension);
}
1 change: 0 additions & 1 deletion RevitLookup/Core/Extensions/ExtensionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public ExtensionManager(Document context)
}

public Document Context { get; }

public Dictionary<string, object> ValuesMap { get; } = new();

public void Register<T>(T value, Action<DescriptorExtension<T>> extension)
Expand Down

0 comments on commit 54609c4

Please sign in to comment.