protected override bool ExtractCachedExternalImagePropertiesIfValid(AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo, out byte[] imageData, out string mimeType, out string streamName)
 {
     imageData  = imageInfo.GetCachedImageData();
     streamName = imageInfo.StreamName;
     mimeType   = imageInfo.MimeType;
     return(true);
 }
 public bool TryGetExternalImage(string value, out AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo)
 {
     if (this.m_cachedExternalImages != null)
     {
         return(this.m_cachedExternalImages.TryGetValue(value, out imageInfo));
     }
     imageInfo = null;
     return(false);
 }
 public void AddExternalImage(string value, AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo)
 {
     this.m_metaDataChanged = true;
     if (this.m_cachedExternalImages == null)
     {
         this.m_cachedExternalImages = new Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo>(EqualityComparers.StringComparerInstance);
     }
     this.m_cachedExternalImages.Add(value, imageInfo);
 }
        public override string AddExternalImage(string value, byte[] imageData, string mimeType)
        {
            Global.Tracer.Assert(imageData != null, "Missing imageData for external image");
            string text = ImageHelper.StoreImageDataInChunk(AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Image, imageData, mimeType, base.m_odpMetadata, base.m_chunkFactory);

            AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = new AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo(text, mimeType);
            imageInfo.SetCachedImageData(imageData);
            base.m_odpMetadata.AddExternalImage(value, imageInfo);
            return(text);
        }
        public override byte[] GetCachedEmbeddedImageBytes(string imageName, OnDemandProcessingContext odpContext)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo);
            bool condition = odpContext.EmbeddedImages.TryGetValue(imageName, out imageInfo);

            Global.Tracer.Assert(condition, "Missing ImageInfo for embedded image");
            byte[] array = this.ReadImageDataFromChunk(imageInfo.StreamName, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.StaticImage);
            if (array != null)
            {
                imageInfo.SetCachedImageData(array);
            }
            return(array);
        }
        public override byte[] GetCachedExternalImageBytes(string value)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo);
            bool condition = base.m_odpMetadata.TryGetExternalImage(value, out imageInfo);

            Global.Tracer.Assert(condition, "Missing ImageInfo for external image");
            byte[] array = this.ReadImageDataFromChunk(imageInfo.StreamName, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Image);
            if (array != null)
            {
                imageInfo.SetCachedImageData(array);
            }
            return(array);
        }
        public override string AddExternalImage(string value, byte[] imageData, string mimeType)
        {
            Global.Tracer.Assert(imageData != null, "Missing imageData for external image");
            string text = ImageHelper.GenerateImageStreamName();

            AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo);
            if (!base.m_odpMetadata.TryGetExternalImage(value, out imageInfo))
            {
                imageInfo = new AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo(text, mimeType);
                base.m_odpMetadata.AddExternalImage(value, imageInfo);
            }
            imageInfo.SetCachedImageData(imageData);
            return(text);
        }
        public override bool TryGetEmbeddedImage(string value, AspNetCore.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes embeddingMode, OnDemandProcessingContext odpContext, out byte[] imageData, out string mimeType, out string streamName)
        {
            Global.Tracer.Assert(embeddingMode == AspNetCore.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes.Inline, "Invalid image embedding mode");
            AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = null;
            Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo> embeddedImages = odpContext.EmbeddedImages;

            if (embeddedImages != null && embeddedImages.TryGetValue(value, out imageInfo))
            {
                imageData  = imageInfo.GetCachedImageData();
                streamName = imageInfo.StreamName;
                mimeType   = imageInfo.MimeType;
                return(true);
            }
            imageData  = null;
            mimeType   = null;
            streamName = null;
            return(false);
        }
Ejemplo n.º 9
0
        public bool TryGetExternalImage(string value, out byte[] imageData, out string mimeType, out string streamName, out bool wasError)
        {
            imageData  = null;
            mimeType   = null;
            streamName = null;
            OnDemandMetadata odpMetadata = this.m_odpMetadata;

            AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo);
            if (odpMetadata.TryGetExternalImage(value, out imageInfo))
            {
                if (imageInfo.ErrorOccurred)
                {
                    wasError = true;
                    return(true);
                }
                wasError = false;
                return(this.ExtractCachedExternalImagePropertiesIfValid(imageInfo, out imageData, out mimeType, out streamName));
            }
            wasError = false;
            return(false);
        }
Ejemplo n.º 10
0
 public void AddFailedExternalImage(string value)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = new AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo(null, null);
     imageInfo.ErrorOccurred = true;
     this.m_odpMetadata.AddExternalImage(value, imageInfo);
 }
Ejemplo n.º 11
0
 protected abstract bool ExtractCachedExternalImagePropertiesIfValid(AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo, out byte[] imageData, out string mimeType, out string streamName);