Example #1
0
        /// <summary>
        /// Adds the combination of array and snapshot into call arrays set.
        /// </summary>
        /// <param name="array">The array.</param>
        /// <param name="snapshot">The snapshot.</param>
        internal void AddCallArray(AssociativeArray array, CopyMemoryModel.Snapshot snapshot)
        {
            IndexSet <Snapshot> snapshots;

            if (!CallArrays.TryGetValue(array, out snapshots))
            {
                snapshots         = new IndexSet <Snapshot>();
                CallArrays[array] = snapshots;
            }

            snapshots.Add(snapshot);
        }
Example #2
0
        /// <summary>
        /// Tries to get list of spashots which contains specified array.
        /// </summary>
        /// <param name="array">The array.</param>
        /// <param name="snapshots">The snapshots.</param>
        /// <returns>List of spashots which contains specified array.</returns>
        internal bool TryGetCallArraySnapshot(AssociativeArray array, out IEnumerable <Snapshot> snapshots)
        {
            IndexSet <Snapshot> snapshotSet = null;

            if (CallArrays.TryGetValue(array, out snapshotSet))
            {
                snapshots = snapshotSet;
                return(true);
            }
            else
            {
                snapshots = null;
                return(false);
            }
        }