public async Task SubscribeToTrollboxAsync() { if (!ActiveSubscriptions.ContainsKey(SubjectNameTrollbox)) { await WampChannelOpenTask; ActiveSubscriptions.Add(SubjectNameTrollbox, WampChannel.RealmProxy.Services.GetSubject(SubjectNameTrollbox).Subscribe(x => ProcessMessageTrollbox(x.Arguments))); } }
public async Task SubscribeToTickerAsync() { try { if (!ActiveSubscriptions.ContainsKey(SubjectNameTicker)) { await WampChannelOpenTask; ActiveSubscriptions.Add(SubjectNameTicker, WampChannel.RealmProxy.Services.GetSubject(SubjectNameTicker).Subscribe(x => ProcessMessageTicker(x.Arguments))); } } catch (Exception ex) { Console.WriteLine("WAMP EXCEPTION (SubscribeToTickerAsync): " + ex.Message); } }
public async Task SubscribeToTickerAsync() { if (!ActiveSubscriptions.ContainsKey(SubjectNameTicker)) { try { await WampChannelOpenTask; ActiveSubscriptions.Add(SubjectNameTicker, WampChannel.RealmProxy.Services.GetSubject(SubjectNameTicker) .Subscribe(x => ProcessMessageTicker(x.Arguments))); } catch (Exception ex) { var clientError = ClientChannelHttpException.CreateFrom(ex); if (clientError != null) { throw clientError; } throw; } } }