MessageSubscription.Unsubscribe
method · MessageSubscription · cAlgo.API Since 5.2
DesktopCLICloud
Unsubscribes current subscription.
Definition
void Unsubscribe()
messageSubscription.Unsubscribe() -> None
Examples
private MessageSubscription _subscription;
protected override void OnStart()
{
_subscription = Messages.Subscribe<string>("Signals", args => Print("Received: {0}", args.Message));
}
protected override void OnStop()
{
_subscription.Unsubscribe();
}
# Not available in Python: subscriptions are created by the generic Messages.Subscribe method