Skip to content

iac249/SimpleBroker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleBroker is a broker-based implementation of the Observer pattern.

If you want to subscribe:

this.Subscribe<SomeClass>(x => {
    // Do something here.
});

// Or

Broker.Subscribe<SomeClass>(this, x => {
    // Do something here.
});

Unsubscribing is just as easy:

this.Unsubscribe<SomeClass>();

// Or

Broker.Unsubscribe<SomeClass>(this);

To publish an object:

var sc = new SomeClass();
sc.Publish();

// Or

Broker.Publish(sc);

SimpleBroker also supports asynchronous publishing:

var sc = new SomeClass();
sc.PublishAsync();

// Or

Broker.PublishAsync(sc);

About

A very simple broker-based implementation of the Observer pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages