Esempio n. 1
0
        private async Task <CallResult <UpdateSubscription> > Subscribe <T>(IEnumerable <string> topics, Action <DataEvent <T> > onData)
        {
            if (_baseAddress == null)
            {
                throw new ArgumentNullException("BaseAddress", "No API address provided for the futures API, check the client options");
            }

            return(await _baseClient.SubscribeInternal(_baseAddress + "stream", topics, onData).ConfigureAwait(false));
        }
Esempio n. 2
0
        /// <summary>
        /// Subscribe
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="url"></param>
        /// <param name="combined"></param>
        /// <param name="onData"></param>
        /// <returns></returns>
        protected async Task <CallResult <UpdateSubscription> > Subscribe <T>(string url, bool combined, Action <T> onData)
        {
            if (combined)
            {
                url = BaseAddress + "stream?streams=" + url;
            }
            else
            {
                url = BaseAddress + "ws/" + url;
            }

            return(await BaseClient.SubscribeInternal(url, onData).ConfigureAwait(false));
        }
 private async Task <CallResult <UpdateSubscription> > Subscribe <T>(IEnumerable <string> topics, Action <DataEvent <T> > onData)
 {
     return(await _baseClient.SubscribeInternal(_baseAddress + "stream", topics, onData).ConfigureAwait(false));
 }