Example #1
0
        void executeRequestForResource(PictureAd ad, ImageOrientation imageOrientation, ImageType imageType)
        {
            string filePath = ad.getLocalImageURL(imageOrientation, imageType);

            if (System.IO.File.Exists(filePath))
            {
                downloadedResourcesCount++;
                if (downloadedResourcesCount == PictureAd.expectedResourcesCount)
                {
                    _resourcesAvailable();
                    _operationCompleteDelegate();
                }
                return;
            }
            string      url = ad.getRemoteImageURL(imageOrientation, imageType);
            HTTPRequest pictureURLRequest = new HTTPRequest(url);

            imageTypes[url]        = imageType;
            imageOrientations[url] = imageOrientation;
            HTTPManager.sendFileRequest(pictureURLRequest, HTTPFileCallback, retryDelays, 20 * 60);
        }