Skip to content

client proxy + subscriber combo #106

Open
@BrannonKing

Description

@BrannonKing

I would like an interface that combines events and methods like this:

public interface IAssetManager {
   public void Add(AssetDto asset); // WampMethod
   public event Action<AssetDto> AssetAdded; // WampEvent
}

Then, after I create the client proxy, I want to add a subscription for the event:

var proxy = channel.RealmProxy.Services.GetCalleeProxy<IAssetManager>();
channel.RealmProxy.Services.RegisterSubscriber(proxy);

Essentially, the AssetAdded on the client proxy should subscribe to the topic when I subscribe (at least once) to the event on the interface. Is there some way I can add another Castle Proxy interceptor to make that happen? Or can I use an abstract callee where I define the event add/remove to do my own subscription? Is there some other approach recommended?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions