当前位置: 首页>>代码示例>>C#>>正文


C# AreaEval.ContainsRow方法代码示例

本文整理汇总了C#中AreaEval.ContainsRow方法的典型用法代码示例。如果您正苦于以下问题:C# AreaEval.ContainsRow方法的具体用法?C# AreaEval.ContainsRow怎么用?C# AreaEval.ContainsRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AreaEval的用法示例。


在下文中一共展示了AreaEval.ContainsRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RowVector

 public RowVector(AreaEval tableArray, int rowIndex)
 {
     _rowIndex = rowIndex;
     int _rowAbsoluteIndex = tableArray.FirstRow + rowIndex;
     if (!tableArray.ContainsRow(_rowAbsoluteIndex))
     {
         int lastRowIx = tableArray.LastRow - tableArray.FirstRow;
         throw new ArgumentException("Specified row index (" + rowIndex
                 + ") is outside the allowed range (0.." + lastRowIx + ")");
     }
     _tableArray = tableArray;
     _size = tableArray.Width;
 }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:13,代码来源:LookupUtils.cs

示例2: ChooseSingleElementFromAreaInternal

        /**
         * @return possibly  <tt>ErrorEval</tt>, and <c>null</c> 
         */
        private static ValueEval ChooseSingleElementFromAreaInternal(AreaEval ae,
                int srcCellRow, short srcCellCol)
        {

            //if (false)
            //{
            //    // this Is too simplistic
            //    if (ae.ContainsRow(srcCellRow) && ae.ContainsColumn(srcCellCol))
            //    {
            //        throw new EvaluationException(ErrorEval.CIRCULAR_REF_ERROR);
            //    }
            //    /*
            //    Circular references are not dealt with directly here, but it Is worth noting some Issues.

            //    ANY one of the return statements in this method could return a cell that Is identical
            //    to the one immediately being Evaluated.  The evaluating cell Is identified by srcCellRow,
            //    srcCellRow AND sheet.  The sheet Is not available in any nearby calling method, so that's
            //    one reason why circular references are not easy to detect here. (The sheet of the returned
            //    cell can be obtained from ae if it Is an Area3DEval.)

            //    Another reason there's little value in attempting to detect circular references here Is
            //    that only direct circular references could be detected.  If the cycle involved two or more
            //    cells this method could not detect it.  

            //    Logic to detect evaluation cycles of all kinds has been coded in EvaluationCycleDetector
            //    (and HSSFFormulaEvaluator). 
            //     */
            //}

            if (ae.IsColumn)
            {
                if (ae.IsRow)
                {
                    return ae.GetRelativeValue(0, 0);
                }
                if (!ae.ContainsRow(srcCellRow))
                {
                    throw EvaluationException.InvalidValue();
                }
                return ae.GetValueAt(srcCellRow, ae.FirstColumn);
            }
            if (!ae.IsRow)
            {
                // multi-column, multi-row area
                if (ae.ContainsRow(srcCellRow) && ae.ContainsColumn(srcCellCol))
                {
                    return ae.GetValueAt(ae.FirstRow, ae.FirstColumn);
                }
                throw EvaluationException.InvalidValue();
            }
            if (!ae.ContainsColumn(srcCellCol))
            {
                throw EvaluationException.InvalidValue();
            }
            return ae.GetValueAt(ae.FirstRow, srcCellCol);
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:59,代码来源:OperandResolver.cs


注:本文中的AreaEval.ContainsRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。