public IAsyncResult BeginRetrieve(CacheRequest request, AsyncCallback callback, object state)
        {
            CacheResponse response = null;
            var           ar       = new CacheAsyncResult {
                strUrl = request.CanonicalUri.ToString()
            };

            // ar.strUrl = "http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest";

            ar.Complete(response, true);
            return(ar);
        }
        public IAsyncResult BeginPersist(CacheRequest request, CacheResponse response, AsyncCallback callback, object state)
        {
            state = false;
            var ar = new CacheAsyncResult();

            //Manipulate the URI
            String tempUri = request.CanonicalUri.ToString();

            if (!_keyUrls.ContainsKey(tempUri))
            {
                //state = true;
                ar.strUrl = tempUri;
                ar.Complete(response, true);
                return(ar);
            }

            ar.Complete(null, true);
            return(ar);
        }
        public IAsyncResult BeginPersist(CacheRequest request, CacheResponse response, AsyncCallback callback, object state)
        {
            state = false;
            var ar = new CacheAsyncResult();

            //Manipulate the URI
            String tempUri = request.CanonicalUri.ToString();

            if (!_keyUrls.ContainsKey(tempUri))
            {
                //state = true;
                ar.strUrl = tempUri;
                ar.Complete(response, true);
                return ar;
            }

            ar.Complete(null, true);
            return ar;
        }
        public IAsyncResult BeginRetrieve(CacheRequest request, AsyncCallback callback, object state)
        {
            CacheResponse response = null;
            var ar = new CacheAsyncResult {strUrl = request.CanonicalUri.ToString()};
            // ar.strUrl = "http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest";

            ar.Complete(response, true);
            return ar;
        }