if (something)
{
return false;
}
else
{
return true;
}
can always be simplified as
return !something;
I meant .Count instead of .Length. Didn’t realize it was a list and not an array.
r == default(RootObject) // checks that r has something
r.data.Count == 0 // checks that there is a stream object in the response
r == default(RootObject) || r.data.Count == 0 // no response or response had no stream
!(r == default(RootObject) || r.data.Count == 0) // there is a response and that response contains a live stream
// so you want this for "the requested stream is live: true/false":
return !(r == default(RootObject) || r.data.Count == 0);