Skip to content

Commit

Permalink
Fixed Rebus handler creation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Jul 7, 2024
1 parent 919c06b commit d05d043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ private class RebusTestFlow : Flow, ISubscribeTo<MyMessage>
public override async Task Run()
{
ReceivedMyMessage = await Messages.FirstOfType<MyMessage>(maxWait: TimeSpan.MaxValue);
Console.WriteLine("OK");
}
}

Expand Down
3 changes: 2 additions & 1 deletion ServiceBuses/Cleipnir.Flows.Rebus/RebusExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public class CleipnirRebusHandler : IHandleMessages<T1>, IHandleMessages<T2> ...
}
*/

var deliverMessageMethod = typeof(FlowsContainer).GetMethod(nameof(FlowsContainer.DeliverMessage));
var flowsContainerMethods = typeof(FlowsContainer).GetMethods(BindingFlags.Public | BindingFlags.Instance);
var deliverMessageMethod = flowsContainerMethods.SingleOrDefault(m => m.Name == nameof(FlowsContainer.DeliverMessage) && m.GetParameters().Length == 1);
ArgumentNullException.ThrowIfNull(deliverMessageMethod);

var assemblyName = new AssemblyName("CleipnirRebusIntegration");
Expand Down

0 comments on commit d05d043

Please sign in to comment.