1 //------------------------------------------------------------------------------
2 // <copyright file="ShaperFactoryQueryCacheKey.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
8 //------------------------------------------------------------------------------
10 using System.Diagnostics;
11 using System.Data.Objects;
12 namespace System.Data.Common.QueryCache
14 internal class ShaperFactoryQueryCacheKey<T> : QueryCacheKey
16 private readonly string _columnMapKey;
17 private readonly MergeOption _mergeOption;
18 private readonly bool _isValueLayer;
20 internal ShaperFactoryQueryCacheKey(string columnMapKey, MergeOption mergeOption, bool isValueLayer)
22 Debug.Assert(null != columnMapKey, "null columnMapKey");
23 _columnMapKey = columnMapKey;
24 _mergeOption = mergeOption;
25 _isValueLayer = isValueLayer;
28 public override bool Equals(object obj)
30 var other = obj as ShaperFactoryQueryCacheKey<T>;
35 return this._columnMapKey.Equals(other._columnMapKey, _stringComparison)
36 && this._mergeOption == other._mergeOption
37 && this._isValueLayer == other._isValueLayer;
40 public override int GetHashCode()
42 return _columnMapKey.GetHashCode();