Exemple #1
0
            /// <summary>
            /// This notifies when a topic is unsubscribed.
            /// </summary>
            /// <param name="topicPath">the full topic path.</param>
            /// <param name="reason">the reason for unsubscription.</param>
            public override void OnUnsubscription(string topicPath, TopicUnsubscribeReason reason)
            {
                var topicElements = topicPath.Split('/');

                switch (topicElements.Length)
                {
                case 3: {
                    RemoveRate(topicElements[1], topicElements[2]);
                }
                break;

                case 2: {
                    RemoveCurrency(topicElements[1]);
                }
                break;
                }
            }
Exemple #2
0
 /// <summary>
 /// Notification of a successful unsubscription.
 /// </summary>
 /// <param name="topicPath">Topic path.</param>
 /// <param name="specification">Topic specification.</param>
 /// <param name="reason">Error reason.</param>
 public void OnUnsubscription(string topicPath, ITopicSpecification specification, TopicUnsubscribeReason reason)
 => WriteLine($"Client unsubscribed from {topicPath} : {reason}.");
 /// <summary>
 /// This notifies when a topic is unsubscribed.
 /// </summary>
 /// <param name="topicPath">the full topic path.</param><param name="reason">the reason for
 /// unsubscription.</param>
 public void OnUnsubscription(string topicPath, TopicUnsubscribeReason reason)
 {
 }
Exemple #4
0
 /// <summary>
 /// Notification of a succesfull unsubscription.
 /// </summary>
 /// <param name="topicPath">Topic path.</param>
 /// <param name="reason">Unsubscription reason.</param>
 public void OnUnsubscription(string topicPath, TopicUnsubscribeReason reason)
 {
     Console.WriteLine("Client unsubscribed from {0} : {1}", topicPath, reason);
 }
            /// <summary>
            /// This notifies when a topic is unsubscribed.
            /// </summary>
            /// <param name="topicPath">the full topic path.</param>
            /// <param name="reason">the reason for unsubscription.</param>
            public override void OnUnsubscription( string topicPath, TopicUnsubscribeReason reason )
            {
                var topicElements = topicPath.Split( '/' );

                switch ( topicElements.Length ) {
                    case 3: {
                            RemoveRate( topicElements[ 1 ], topicElements[ 2 ] );
                        }
                        break;
                    case 2: {
                            RemoveCurrency( topicElements[ 1 ] );
                        }
                        break;
                }
            }