Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue QueueCommand and AddCommand cannot be found error hangfire_182 #81

Merged

Conversation

1bberto
Copy link
Contributor

@1bberto 1bberto commented Nov 3, 2023

With the new Hangfire.SqlServer 1.8.6 the method AddCommand from the class SqlServerWriteOnlyTransaction, was changed to static HangfireIO/Hangfire@c0d6290.

Updating to get the method with the proper BindingFlags, adding BindingFlags.Static

closes #77

relates to #80

@@ -61,7 +61,7 @@ public SqlTagsTransaction(SqlServerStorageOptions options, IWriteOnlyTransaction
if (_addCommand == null)
{
_addCommand = transaction.GetType().GetTypeInfo().GetMethod(nameof(AddCommand),
BindingFlags.NonPublic | BindingFlags.Instance);
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to work with Hangfire.SqlServer > 1.8.6

HangfireIO/Hangfire@c0d6290

@1bberto 1bberto changed the title Fix issue QueueCommand and AddCommand cannot be found error Fix issue QueueCommand and AddCommand cannot be found error hangfire_182 Nov 3, 2023
@erwin-faceit erwin-faceit merged commit 6347939 into face-it:hangfire_182 Nov 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants