コード例 #1
0
 protected void cleanup()
 {
     if (sOpts.DurableName != null && unsubscribe)
     {
         s?.Unsubscribe();
     }
     c?.Close();
 }
コード例 #2
0
        public bool Unsubscribe(string subject)
        {
            subject = $"{productID}_{subject}";
            IStanSubscription stanSubscription = null;

            if (dicSubscription.TryRemove(subject, out stanSubscription))
            {
                stanSubscription.Unsubscribe();
                return(true);
            }
            else
            {
                return(false);
            }
        }