Beispiel #1
0
        /// <summary>
        /// Deterministic cache record error
        /// </summary>
        /// <param name="cacheId">CacheId</param>
        /// <param name="oldRecord">Existing cache record</param>
        /// <param name="newRecord">Attempted new cache record</param>
        /// <remarks>
        /// This failure is raised when a cache record that is marked as
        /// deterministic is unable to be added to the cache due to a
        /// prior, non-matching record.  If the records do match then
        /// the determinism is re-affirmed and not an error.
        /// </remarks>
        public NotDeterministicFailure(string cacheId, FullCacheRecord oldRecord, FullCacheRecord newRecord)
        {
            Contract.Requires(cacheId != null);
            Contract.Requires(oldRecord != null);
            Contract.Requires(newRecord != null);

            m_description = string.Format(CultureInfo.InvariantCulture, "Cache: {0} - Deterministic record {1} has a non-matching prior value {2}", cacheId, newRecord, oldRecord);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FullCacheRecordWithDeterminism"/> struct.
 /// </summary>
 public FullCacheRecordWithDeterminism(FullCacheRecord record)
 {
     Contract.Requires(record != null);
     Record      = record;
     Determinism = record.CasEntries.Determinism;
 }