public void ServeDzi(HttpContext context) { DziRequest request = new DziRequest(context.Request.Url); Collection collection = _collectionCache.Get(request.CollectionKey); if (collection == null) { ServeStaticFile(context, "text/xml"); return; } CollectionItem item = collection.Items[request.ItemId]; ImageProviderBase image = item.ImageProvider; context.Response.ContentType = "text/xml"; DziSerializer.Serialize(context.Response.Output, image.Size); }
public void ServeDzi(HttpContext context) { DziRequest request = new DziRequest(context.Request.Url); Collection collection = m_collectionCache.Get(request.CollectionKey); if (null == collection) { context.Response.StatusCode = (int)HttpStatusCode.NotFound; context.Response.StatusDescription = "Pivot image data not found. Cache may have expired."; return; } CollectionItem item = collection.Items[request.ItemId]; ImageProviderBase image = item.ImageProvider; context.Response.ContentType = "text/xml"; DziSerializer.Serialize(context.Response.Output, image.Size); }