void IPersistable.Serialize(IntermediateFormatWriter writer)
        {
            writer.RegisterDeclaration(m_Declaration);
            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.ActionDefinition:
                    writer.Write(base.ActionDef);
                    break;

                case MemberName.Actions:
                {
                    ActionInstance[] array = new ActionInstance[base.Actions.Count];
                    for (int i = 0; i < array.Length; i++)
                    {
                        array[i] = base.Actions[i].Instance;
                    }
                    writer.Write(array);
                    break;
                }

                case MemberName.ImageMapAreas:
                    writer.WriteRIFList(ImageMapAreaInstances.InternalList);
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
Exemple #2
0
        internal override void Serialize(IntermediateFormatWriter writer)
        {
            base.Serialize(writer);
            writer.RegisterDeclaration(m_Declaration);
            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.ImageData:
                    writer.Write(m_imageData);
                    break;

                case MemberName.MIMEType:
                {
                    string value = null;
                    if (base.ImageDef.MIMEType != null && base.ImageDef.MIMEType.IsExpression)
                    {
                        value = m_mimeType;
                    }
                    writer.Write(value);
                    break;
                }

                case MemberName.Actions:
                {
                    ActionInstance[] array = null;
                    if (base.ImageDef.ActionInfo != null)
                    {
                        array = new ActionInstance[base.ImageDef.ActionInfo.Actions.Count];
                        for (int i = 0; i < array.Length; i++)
                        {
                            array[i] = base.ImageDef.ActionInfo.Actions[i].Instance;
                        }
                    }
                    writer.Write(array);
                    break;
                }

                case MemberName.ImageMapAreas:
                    writer.WriteRIFList(ActionInfoWithDynamicImageMapAreas.InternalList);
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
        internal void ConstructActionDefinition()
        {
            ActionInstance instance = Instance;

            Global.Tracer.Assert(instance != null);
            if (instance.Label != null)
            {
                m_actionItemDef.Label = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Label);
            }
            else
            {
                m_actionItemDef.Label = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_label = null;
            if (BookmarkLink != null)
            {
                if (instance.BookmarkLink != null)
                {
                    m_actionItemDef.BookmarkLink = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.BookmarkLink);
                }
                else
                {
                    m_actionItemDef.BookmarkLink = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
                }
                m_bookmark = null;
            }
            if (Hyperlink != null)
            {
                if (instance.HyperlinkText != null)
                {
                    m_actionItemDef.HyperLinkURL = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.HyperlinkText);
                }
                else
                {
                    m_actionItemDef.HyperLinkURL = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
                }
                m_hyperlink = null;
            }
            if (Drillthrough != null)
            {
                Drillthrough.ConstructDrillthoughDefinition();
            }
        }