Esempio n. 1
0
        /// <inheritdoc />        
        public override bool ContainsOrSubsumes(ICellReference cellRef)
        {
            if (cellRef == null)
            {
                throw new ArgumentNullException("cellRef");
            }

            return this.Value.Equals(cellRef.Value, StringComparison.OrdinalIgnoreCase);
        }
Esempio n. 2
0
        /// <summary>
        /// Checks to see if the value contained in one cell reference is exactly equal to the value contained in
        /// the other cell reference. Use this for quick comparisons or testing, otherwise use Equals, which calls
        /// this method anyhow.
        /// </summary>
        /// <param name="first">The first cell reference to compare.</param>
        /// <param name="second">The second cell reference to compare.</param>
        /// <returns>True if the value properties of this and the other cell reference are exactly equal,
        /// false otherwise.</returns>
        public static bool ValueEquals(ICellReference first, ICellReference second)
        {
            // We should only compare valid cell references. Nulls mean no equality.
            if (first == null || second == null)
            {
                return false;
            }

            return first.Value.Equals(second.Value, StringComparison.OrdinalIgnoreCase);
        }
Esempio n. 3
0
 /// <inheritdoc/>
 public abstract bool ContainsOrSubsumes(ICellReference cellRef);
Esempio n. 4
0
 /// <inheritdoc />
 public override bool ContainsOrSubsumes(ICellReference cellRef)
 {
     if (cellRef is SingleCellReference)
     {
         return this.Contains((SingleCellReference)cellRef);
     }
     else if (cellRef is RangeCellReference)
     {
         return this.Subsumes((RangeCellReference)cellRef);
     }
     else
     {
         return false;
     }
 }