Exemple #1
0
        /// <summary>
        /// Gets the enumerator for an element reference within this snapshot region.
        /// </summary>
        /// <param name="pointerIncrementMode">The method for incrementing pointers.</param>
        /// <param name="constraints">The constraint to use for element comparisons.</param>
        /// <returns>The enumerator for an element reference within this snapshot region.</returns>
        public IEnumerator <SnapshotElementComparer> IterateComparer(SnapshotElementComparer.PointerIncrementMode pointerIncrementMode, Constraint constraints, DataTypeBase dataType)
        {
            Int32 elementCount = this.GetElementCount(dataType.Size);
            SnapshotElementComparer snapshotElement = new SnapshotElementComparer(region: this, pointerIncrementMode: pointerIncrementMode, constraints: constraints, dataType: dataType);

            for (Int32 elementIndex = 0; elementIndex < elementCount; elementIndex++)
            {
                yield return(snapshotElement);

                snapshotElement.IncrementPointers();
            }
        }
Exemple #2
0
        /// <summary>
        /// Gets the enumerator for an element reference within this snapshot region.
        /// </summary>
        /// <param name="pointerIncrementMode">The method for incrementing pointers.</param>
        /// <param name="compareActionConstraint">The constraint to use for the element quick action.</param>
        /// <param name="compareActionValue">The value to use for the element quick action.</param>
        /// <returns>The enumerator for an element reference within this snapshot region.</returns>
        public IEnumerator <SnapshotElementComparer> IterateComparer(
            SnapshotElementComparer.PointerIncrementMode pointerIncrementMode,
            ConstraintNode constraints)
        {
            Int32 elementCount = this.ElementCount;
            SnapshotElementComparer snapshotElement = new SnapshotElementComparer(region: this, pointerIncrementMode: pointerIncrementMode, constraints: constraints);

            for (Int32 elementIndex = 0; elementIndex < elementCount; elementIndex++)
            {
                yield return(snapshotElement);

                snapshotElement.IncrementPointers();
            }
        }