public SectionCellLocator DeepCloneWithSlotSelectionStrategy(SlotSelectionStrategy slotSelectionStrategy) { var result = new SectionCellLocator( this.CellId?.DeepClone(), this.SlotId?.DeepClone(), slotSelectionStrategy); return(result); }
/// <summary> /// Builds a <see cref="SectionCellLocator"/>. /// </summary> /// <param name="cellId">The id of the cell.</param> /// <param name="slotId">OPTIONAL id of the slot to use -OR- null if not addressing an <see cref="ISlottedCell"/>. DEFAULT is to address an <see cref="INotSlottedCell"/>.</param> /// <param name="slotSelectionStrategy">OPTIONAL strategy to use to select a slot if addressing an <see cref="ISlottedCell"/>. DEFAULT is to throw if addressing an <see cref="ISlottedCell"/> -AND- <paramref name="slotId"/> is not specified.</param> /// <returns> /// A <see cref="SectionCellLocator"/>. /// </returns> public static SectionCellLocator InThisSection( string cellId, string slotId = null, SlotSelectionStrategy slotSelectionStrategy = SlotSelectionStrategy.ThrowIfSlotIdNotSpecified) { var result = new SectionCellLocator(cellId, slotId, slotSelectionStrategy); return(result); }
/// <summary> /// Builds a <see cref="ReportCellLocator"/>. /// </summary> /// <param name="sectionId">The id of the section that contains the cell.</param> /// <param name="cellId">The id of the cell.</param> /// <param name="slotId">OPTIONAL id of the slot to use -OR- null if not addressing an <see cref="ISlottedCell"/>. DEFAULT is to address an <see cref="INotSlottedCell"/>.</param> /// <param name="slotSelectionStrategy">OPTIONAL strategy to use to select a slot if addressing an <see cref="ISlottedCell"/>. DEFAULT is to throw if addressing an <see cref="ISlottedCell"/> -AND- <paramref name="slotId"/> is not specified.</param> /// <returns> /// A <see cref="ReportCellLocator"/>. /// </returns> public static ReportCellLocator InThisReport( string sectionId, string cellId, string slotId = null, SlotSelectionStrategy slotSelectionStrategy = SlotSelectionStrategy.ThrowIfSlotIdNotSpecified) { var result = new ReportCellLocator(sectionId, cellId, slotId, slotSelectionStrategy); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="SectionCellLocator"/> class. /// </summary> /// <param name="cellId">The id of the cell.</param> /// <param name="slotId">OPTIONAL id of the slot to use -OR- null if not addressing an <see cref="ISlottedCell"/>. DEFAULT is to address an <see cref="INotSlottedCell"/>.</param> /// <param name="slotSelectionStrategy">OPTIONAL strategy to use to select a slot if addressing an <see cref="ISlottedCell"/>. DEFAULT is to throw if addressing an <see cref="ISlottedCell"/> -AND- <paramref name="slotId"/> is not specified.</param> public SectionCellLocator( string cellId, string slotId = null, SlotSelectionStrategy slotSelectionStrategy = SlotSelectionStrategy.ThrowIfSlotIdNotSpecified) { if (cellId == null) { throw new ArgumentNullException(nameof(cellId)); } if (string.IsNullOrWhiteSpace(cellId)) { throw new ArgumentException(Invariant($"{nameof(cellId)} is white space.")); } if (slotSelectionStrategy == SlotSelectionStrategy.Unknown) { throw new ArgumentOutOfRangeException(Invariant($"{nameof(slotSelectionStrategy)} is {nameof(DataStructure.SlotSelectionStrategy)}.{nameof(SlotSelectionStrategy.Unknown)}.")); } this.CellId = cellId; this.SlotId = slotId; this.SlotSelectionStrategy = slotSelectionStrategy; }