コード例 #1
0
        private async Task SuspensionsHubSignalRClient_OnNewSuspension(object _, NewSuspensionEventArgs e)
        {
            if (string.Equals(e.ChannelOfOrigin, CurrentlySelectedChannel, StringComparison.OrdinalIgnoreCase))
            {
                UserRulesExceededModels = await apiGateway.Get <List <UserRulesExceededModel> >("channels", routeValues : new string[] { CurrentlySelectedChannel, "channelRules", "exceeded" }).ConfigureAwait(false);

                NotifyStateChanged();
            }
        }
コード例 #2
0
        private async Task SuspensionsHub_OnNewSuspension(object _, NewSuspensionEventArgs args)
        {
            if (!string.Equals(CurrentlySelectedChannel, args.ChannelOfOrigin, StringComparison.OrdinalIgnoreCase))
            {
                return;
            }

            var qParam        = new QueryParam("suspensionId", args.SuspensionId.ToString());
            var newSuspension = await apiGateway.Get <SuspensionModel>("suspensions", queryParams : qParam).ConfigureAwait(false);

            UpdateState(newSuspension);
        }