Info
Version: | 1.1.0 |
Author(s): | Alexander |
Last Update: | Thursday, September 11, 2014 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/SuperSimplePubSub |
Install
Install-Package SuperSimplePubSub
dotnet add package SuperSimplePubSub
paket add SuperSimplePubSub
SuperSimplePubSub Download (Unzip the "nupkg" after downloading)
Look here:
string test = " world";
// let's define a subscriber
Action<object> hi = (ob) => { Console.WriteLine("hi" + ob); };
// let's subscribe
Pub.Sub["hello"] = hi;
// lets publish test on hello channel
Pub.Sub["hello"](test);
// now let's remove our subscriber
Pub.Sub.Remove("hello", hi);
// EASY.