//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner Microsoft // @backupOwner Microsoft //------------------------------------------------------------------------------ namespace System.Data.Common.QueryCache { using System; using System.Collections.Generic; using System.Text; using System.Data.Common; using System.Diagnostics; /// /// Represents the abstract base class for all cache entry values in the query cache /// internal class QueryCacheEntry { #region Fields /// /// querycachekey for this entry /// readonly private QueryCacheKey _queryCacheKey; /// /// strong reference to the target object /// readonly protected object _target; #endregion #region Constructors /// /// cache entry constructor /// /// /// internal QueryCacheEntry(QueryCacheKey queryCacheKey, object target) { _queryCacheKey = queryCacheKey; _target = target; } #endregion #region Methods and Properties /// /// The payload of this cache entry. /// internal virtual object GetTarget() { return _target; } /// /// Returns the query cache key /// internal QueryCacheKey QueryCacheKey { get { return _queryCacheKey; } } #endregion } }