ERROR - method param is null

When I enqueue job like this:

Hangfire.BackgroundJob.Enqueue(() => OrderAndPaymentUpdateViaHangfire(data.PRCODE, 
                                     data.SRCODE, data.RESULTTEXT,  orderId, orderRef, baseDigestOK, userEmail, userIC, 
                                     mailHTMLTemplate, mailSubject));

For this method:

    private void OrderAndPaymentUpdateViaHangfire(int PRCODE, int SRCODE, string RESULTTEXT, 
                                 int orderId, string orderRef, bool baseDigestOK, string userEmail, string userIC, 
                                 string mailHTMLTemplate, string mailSubject)
I get ERROR:
   at Hangfire.Common.Job..ctor(Type type, MethodInfo method, Object[] args)
   at Hangfire.Common.Job.FromExpression(LambdaExpression methodCall, Type explicitType)
   at Hangfire.BackgroundJobClientExtensions.Create(IBackgroundJobClient client, Expression`1 methodCall, IState state)
   at PaymentGatewayProcess.HangfireUpdateJob(PaymentResponseDto data, Int32 orderId, String orderRef, Boolean baseDigestOK, String userEmail, String userIC, String mailHTMLTemplate, String mailSubject) in C:\WebShop\PaymentGatewayProcess.cs:line 208
   at PaymentGatewayProcess.ProcessPaymentResponse(PaymentResponseDto data, Int32 orderId, String orderRef, String userEmail, String userIC, String mailHTMLTemplate, String mailSubject) in C:\WebShop\PaymentGatewayProcess.cs:line 185

When I enqueue job like this:
Hangfire.BackgroundJob.Enqueue(() => SubmitAllData(account, hardware, lcid));

Method is:
public bool SubmitAllData(AccountBl account, List<HardwareBl> hardware, int lcid)

IT WORKS!

BUG?

Hi, @excrucio.

Now, only public methods are supported for background performing in Hangfire. To tell the truth I don’t know why this decision was taken. May be there was some ideological reasons.

Anyway, if you change access modifier of OrderAndPaymentUpdateViaHangfire method from private to public it will work.