Ejemplo n.º 1
0
        public override void Deserialize(IntermediateFormatReader reader)
        {
            base.Deserialize(reader);
            reader.RegisterDeclaration(m_Declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.Source:
                    m_source = (Microsoft.ReportingServices.OnDemandReportRendering.Image.SourceType)reader.ReadEnum();
                    break;

                case MemberName.Value:
                    m_value = (ExpressionInfo)reader.ReadRIFObject();
                    break;

                case MemberName.MIMEType:
                    m_MIMEType = (ExpressionInfo)reader.ReadRIFObject();
                    break;

                case MemberName.Sizing:
                    m_sizing = (Microsoft.ReportingServices.OnDemandReportRendering.Image.Sizings)reader.ReadEnum();
                    break;

                case MemberName.Action:
                    m_action = (Action)reader.ReadRIFObject();
                    break;

                case MemberName.Tag:
                {
                    ExpressionInfo expressionInfo = (ExpressionInfo)reader.ReadRIFObject();
                    if (expressionInfo != null)
                    {
                        m_tags = new List <ExpressionInfo>(1)
                        {
                            expressionInfo
                        };
                    }
                    break;
                }

                case MemberName.Tags:
                    m_tags = reader.ReadGenericListOfRIFObjects <ExpressionInfo>();
                    break;

                case MemberName.EmbeddingMode:
                    m_embeddingMode = (Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes)reader.ReadEnum();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
 public override bool TryGetEmbeddedImage(string value, Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes embeddingMode, OnDemandProcessingContext odpContext, out byte[] imageData, out string mimeType, out string streamName)
 {
     if (embeddingMode == Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes.Package)
     {
         imageData  = null;
         mimeType   = null;
         streamName = null;
         return(true);
     }
     Global.Tracer.Assert(condition: false, "Embedded Images are not supported in Streaming ODP mode.");
     throw new InvalidOperationException("Embedded Images are not supported in Streaming ODP mode.");
 }
        public override bool TryGetEmbeddedImage(string value, Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes embeddingMode, OnDemandProcessingContext odpContext, out byte[] imageData, out string mimeType, out string streamName)
        {
            Global.Tracer.Assert(embeddingMode == Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes.Inline, "Invalid image embedding mode");
            Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo value2 = null;
            Dictionary <string, Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo> embeddedImages = odpContext.EmbeddedImages;

            if (embeddedImages == null || !embeddedImages.TryGetValue(value, out value2))
            {
                imageData  = null;
                mimeType   = null;
                streamName = null;
                return(false);
            }
            imageData  = value2.GetCachedImageData();
            streamName = value2.StreamName;
            mimeType   = value2.MimeType;
            return(true);
        }
Ejemplo n.º 4
0
 public abstract bool TryGetEmbeddedImage(string value, Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes embeddingMode, OnDemandProcessingContext odpContext, out byte[] imageData, out string mimeType, out string streamName);