private void EvaluateOriginalValue()
 {
     if (!this.m_originalValueEvaluated)
     {
         this.m_originalValueEvaluated = true;
         AspNetCore.ReportingServices.ReportIntermediateFormat.TextBox texBoxDef = this.m_textBoxDef.TexBoxDef;
         if (texBoxDef.HasValue)
         {
             OnDemandProcessingContext odpContext = base.RenderingContext.OdpContext;
             this.m_originalValue = default(VariantResult);
             if (texBoxDef.IsSimple)
             {
                 InternalTextRunInstance internalTextRunInstance = (InternalTextRunInstance)((ReportElementCollectionBase <TextRun>)((ReportElementCollectionBase <Paragraph>) this.m_textBoxDef.Paragraphs)[0].TextRuns)[0].Instance;
                 this.m_originalValue.Value         = internalTextRunInstance.OriginalValue;
                 this.m_originalValue.ErrorOccurred = internalTextRunInstance.ProcessedWithError;
                 this.m_typeCode = internalTextRunInstance.TypeCode;
                 this.m_originalValue.TypeCode = this.m_typeCode.Value;
             }
             else
             {
                 StringBuilder stringBuilder = new StringBuilder();
                 bool          flag          = false;
                 bool          flag2         = true;
                 foreach (ParagraphInstance paragraphInstance in this.ParagraphInstances)
                 {
                     if (!flag2)
                     {
                         flag = true;
                         stringBuilder.Append(Environment.NewLine);
                     }
                     else
                     {
                         flag2 = false;
                     }
                     foreach (TextRunInstance textRunInstance in paragraphInstance.TextRunInstances)
                     {
                         object originalValue = textRunInstance.OriginalValue;
                         if (originalValue != null)
                         {
                             flag = true;
                             stringBuilder.Append(originalValue);
                         }
                     }
                 }
                 if (flag)
                 {
                     this.m_originalValue.Value    = stringBuilder.ToString();
                     this.m_originalValue.TypeCode = TypeCode.String;
                     this.m_typeCode = TypeCode.String;
                 }
             }
         }
         else
         {
             this.m_typeCode = TypeCode.Empty;
         }
     }
 }
 private void Parse()
 {
     if (!this.m_parsed)
     {
         try
         {
             this.m_parsed = true;
             this.m_paragraphDef.CriGenerationPhase = ReportElement.CriGenerationPhases.Definition;
             this.m_textRunDef.CriGenerationPhase   = ReportElement.CriGenerationPhases.Definition;
             ReportEnumProperty <MarkupType> markupType = this.m_textRunDef.MarkupType;
             MarkupType     markupType2    = (!markupType.IsExpression) ? markupType.Value : this.m_textRunDef.Instance.MarkupType;
             RichTextParser richTextParser = null;
             MarkupType     markupType3    = markupType2;
             if (markupType3 == MarkupType.HTML)
             {
                 richTextParser = new HtmlParser(this.m_multipleParagraphsAllowed, this, this);
                 InternalTextRunInstance internalTextRunInstance = (InternalTextRunInstance)this.m_textRunDef.Instance;
                 AspNetCore.ReportingServices.RdlExpressions.VariantResult originalValue = internalTextRunInstance.GetOriginalValue();
                 if (!originalValue.ErrorOccurred && originalValue.TypeCode != 0)
                 {
                     try
                     {
                         string richText = (originalValue.TypeCode != TypeCode.String) ? internalTextRunInstance.TextRunDef.FormatTextRunValue(originalValue.Value, originalValue.TypeCode, this.m_textRunDef.RenderingContext.OdpContext) : (originalValue.Value as string);
                         this.m_compiledParagraphCollection = (CompiledParagraphInstanceCollection)richTextParser.Parse(richText);
                     }
                     catch (Exception ex)
                     {
                         this.m_errorContext.Register(ProcessingErrorCode.rsInvalidRichTextParseFailed, Severity.Warning, "TextRun", internalTextRunInstance.TextRunDef.Name, ex.Message);
                         this.m_parseErrorOccured = true;
                         ICompiledTextRunInstance compiledTextRunInstance = this.CreateSingleTextRun();
                         compiledTextRunInstance.Value = RPRes.rsRichTextParseErrorValue;
                     }
                 }
                 else
                 {
                     ICompiledTextRunInstance compiledTextRunInstance2 = this.CreateSingleTextRun();
                     if (originalValue.ErrorOccurred)
                     {
                         compiledTextRunInstance2.Value = RPRes.rsExpressionErrorValue;
                     }
                 }
             }
         }
         finally
         {
             this.m_textRunDef.CriGenerationPhase   = ReportElement.CriGenerationPhases.None;
             this.m_paragraphDef.CriGenerationPhase = ReportElement.CriGenerationPhases.None;
         }
     }
 }