Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Probably missing ability to dispatch non-typed messages #8

@Razenpok

Description

@Razenpok

Hi again,

I have a use-case of message forwarding from a different event bus. This event bus can dispatch generic-typed events as well as an ability to handle all the events in a single general handler, in which case the dispatched event will be passed as an object.

// e here is an `object` which cannot be dispatched to a generic AsyncMessageBus handler
DomainEvents.RegisterGeneralHandler(e => AsyncMessageBus.Default.PublishAsync(e));

An easy fix here would be to add an overload that accepts object as a msg argument and just msg.GetType(). Probably it is not needed in UniTaskPubSub or maybe there's a better way to do this, but right now I'm not sure how to deal with this issue without Reflection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions