M-Files / VAF.Extensions.Community

Community-built .NET extension methods for use with the M-Files Vault Application Framework.
MIT License
25 stars 20 forks source link

CustomCommand Attribute in base class #108

Closed Marcel-Marghitola closed 1 year ago

Marcel-Marghitola commented 1 year ago

Adding the example from https://github.com/M-Files/VAF.Extensions.Community/tree/master/MFiles.VAF.Extensions#buttons-in-the-header to a derviced class (VaultApplication) works, but if the CustomCommand is added to a base class (VaultApplicationBase) an exception is thrown indicating that VaultApplication is not assignable to VaultApplicationBase. It seems like the check is performed incorrectly. It checks if VaultApplication is assignable from ( instead of to) VaultApplicationBase.

Relevant code line: https://github.com/M-Files/VAF.Extensions.Community/blob/d933daa828375dad77fb6461a69179c95232a47f/MFiles.VAF.Extensions/Dashboards/Commands/CustomDomainCommandResolution/AttributeCustomDomainCommandResolver.cs#L146C89-L146C89