예제 #1
0
        /// <summary>
        /// Unregisters the listener for given order book pair.
        /// </summary>
        /// <param name="gets">The gets.</param>
        /// <param name="pays">The pays.</param>
        public void UnregisterListener(Amount gets, Amount pays)
        {
            var key = ResponseParser.GetAmoutPairKey(gets, pays);

            if (_books.ContainsKey(key))
            {
                _books.Remove(key);
            }
        }
예제 #2
0
        /// <summary>
        /// Registers the listener for given order book pair.
        /// </summary>
        /// <param name="gets">The amount of gets.</param>
        /// <param name="pays">The amount of pays.</param>
        /// <param name="callback">The callback.</param>
        public void RegisterListener(Amount gets, Amount pays, MessageCallback <TxResult> callback)
        {
            var key = ResponseParser.GetAmoutPairKey(gets, pays);

            _books[key] = callback;
        }