PeerCastStation.UI.HTTP.APIHost.APIContext.GetChannelAnnouncingInfo C# (CSharp) Méthode

GetChannelAnnouncingInfo() private méthode

private GetChannelAnnouncingInfo ( string channelId ) : Newtonsoft.Json.Linq.JArray
channelId string
Résultat Newtonsoft.Json.Linq.JArray
      private JArray GetChannelAnnouncingInfo(string channelId)
      {
        var announcings = Enumerable.Empty<IAnnouncingChannel>();
        var channel = GetChannel(channelId);
        foreach (var yp in PeerCast.YellowPages) {
          announcings = announcings.Concat(yp.AnnouncingChannels.Where(ac => ac.Channel.ChannelID==channel.ChannelID));
        }
        return new JArray(announcings.Select(ac => {
          var acinfo = new JObject();
          acinfo["yellowPageId"] = GetObjectId(ac.YellowPage);
          acinfo["name"]         = ac.YellowPage.Name;
          acinfo["protocol"]     = ac.YellowPage.Protocol;
          acinfo["uri"]          = ac.YellowPage.AnnounceUri==null ? null : ac.YellowPage.AnnounceUri.ToString();
          acinfo["status"]       = ac.Status.ToString();
          return acinfo;
        }));
      }