protected void cleanup() { if (sOpts.DurableName != null && unsubscribe) { s?.Unsubscribe(); } c?.Close(); }
public bool Unsubscribe(string subject) { subject = $"{productID}_{subject}"; IStanSubscription stanSubscription = null; if (dicSubscription.TryRemove(subject, out stanSubscription)) { stanSubscription.Unsubscribe(); return(true); } else { return(false); } }