private bool StopChannelConnection(string channelId, int connectionId)
{
var channel = GetChannel(channelId);
var os = channel.OutputStreams.FirstOrDefault(s => GetObjectId(s)==connectionId);
if (os!=null) {
channel.RemoveOutputStream(os);
os.Stop();
return true;
}
foreach (var yp in PeerCast.YellowPages) {
var ac = yp.AnnouncingChannels
.Where(s => GetObjectId(s)==connectionId)
.Where(s => s.Channel.ChannelID==channel.ChannelID).FirstOrDefault();
if (ac!=null) {
yp.StopAnnounce(ac);
return true;
}
}
return false;
}