コード例 #1
0
        public override void DoCells(Parse parse)
        {
            if (restFixture == null)
            {
                restFixture        = new CommonRestFixture <Parse>(this.Symbols);
                restFixture.Config = Config.getConfig(ConfigNameFromArgs);
                string url = BaseUrlFromArgs;
                if (url != null)
                {
                    restFixture.BaseUrl = new Url(HtmlTools.fromSimpleTag(url));
                }
                restFixture.initialize(Runner.FIT);
                ((FitFormatter)restFixture.Formatter).ActionFixtureDelegate = this;
            }
            IRowWrapper <Parse> currentRow = new FitRow(parse);

            try
            {
                restFixture.Formatter.DisplayActual = restFixture.displayActualOnRight;
                restFixture.processRow(currentRow);
            }
            catch (Exception exception)
            {
                // TODO: Sort out CellWrapper vs CellWrapper<Parse>.
                ICellWrapper <Parse> firstCell = currentRow.getCell(0);
                LOG.Error(exception, "Exception when processing row {0}", firstCell.text());
                ICellFormatter <Parse> cellFormatter = restFixture.Formatter;
                cellFormatter.exception(firstCell, exception);
            }
        }
コード例 #2
0
        /// <summary>
        /// Slim Table table hook.
        /// </summary>
        /// <param name="rows"> the rows to process </param>
        /// <returns> the rendered content. </returns>
        public virtual IList <IList <string> > doTable(IList <IList <string> > rows)
        {
            _restFixture.initialize(Runner.SLIM);
            IList <IList <string> > res = new List <IList <string> >();

            _restFixture.Formatter.DisplayActual              = _restFixture.displayActualOnRight;
            _restFixture.Formatter.DisplayAbsoluteURLInFull   = _restFixture.displayAbsoluteURLInFull;
            _restFixture.Formatter.MinLengthForToggleCollapse = _restFixture.minLenForCollapseToggle;
            foreach (IList <string> r in rows)
            {
                processSlimRow(res, r);
            }
            return(res);
        }