private static bool AdvertismentsNotLoaded(AdvertismentsResponse adversitmentsAndFullParsedCount)
 {
     return(adversitmentsAndFullParsedCount == null ||
            (adversitmentsAndFullParsedCount != null &&
             adversitmentsAndFullParsedCount.Advertisments != null &&
             adversitmentsAndFullParsedCount.Advertisments.All(a => a.isSpecial)));
 }
    public AdvertismentsResponse LoadAdvertisments(Nedvijimost.AdvertismentsRequest request)
    {
        if (request.Date == null)
        {
            AdvertismentsResponse adversitmentsAndFullParsedCount = LoadTodayAdversitments(request);
            if (AdvertismentsNotLoaded(adversitmentsAndFullParsedCount))
            {
                adversitmentsAndFullParsedCount = LoadYesterdayAdversitments(request);
            }

            return(adversitmentsAndFullParsedCount);
        }
        else
        {
            return(LoadAdversitments(request));
        }
    }