コード例 #1
0
        /// <summary>
        /// Finds and processes directives of the specified cell.
        /// </summary>
        protected void FindDirectives(Cell cell)
        {
            void InvokeDirectiveFound(string dirName, string dirVal)
            {
                DirectiveFound?.Invoke(this, new ExcelDirectiveEventArgs
                {
                    Stage          = Stage,
                    DirectiveName  = dirName,
                    DirectiveValue = dirVal,
                    Node           = cell.DataNode,
                    Cell           = cell
                });
            }

            if (cell.DataNode is XmlNode dataNode)
            {
                if (FindDirective(dataNode.InnerText, ReportDirectives.RepRow, out string val, out string rest))
                {
                    dataNode.InnerText = rest;
                    InvokeDirectiveFound(ReportDirectives.RepRow, val);
                }
                else if (FindDirective(dataNode.InnerText, ReportDirectives.RepVal, out val, out _))
                {
                    InvokeDirectiveFound(ReportDirectives.RepVal, val);
                }
            }
コード例 #2
0
 /// <summary>
 /// Raises a DirectiveFound event.
 /// </summary>
 protected void OnDirectiveFound(string directiveName, string directiveValue, XmlNode xmlNode)
 {
     DirectiveFound?.Invoke(this, new DirectiveEventArgs
     {
         Stage          = Stage,
         DirectiveName  = directiveName,
         DirectiveValue = directiveValue,
         Node           = xmlNode,
     });
 }
コード例 #3
0
 /// <summary>
 /// Raises a DirectiveFound event.
 /// </summary>
 protected void OnDirectiveFound(DirectiveEventArgs e)
 {
     DirectiveFound?.Invoke(this, e);
 }