Esempio n. 1
0
        public void Returns_Key()
        {
            var key = _factory.GetKey();

            string expected = $@"{_providerFactory.GetHashCode()}_{_connectionString.GetHashCode()}";
            Assert.That(key, Is.EqualTo(expected));
        }
Esempio n. 2
0
        /// <summary>
        /// Get the hash code for this key
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// Other plugins of the same type are the same plugin, but user data mappers of the
        /// same type are not necessarily the same data mapper.
        /// </remarks>
        public override int GetHashCode()
        {
            var h =
                (Plugin.GetType()?.GetHashCode() ?? 0) ^
                (Factory?.GetHashCode() ?? 0) ^
                (ConnectionString?.GetHashCode() ?? 0) ^
                (BareTableName?.GetHashCode() ?? 0) ^
                (TableOwner?.GetHashCode() ?? 0) ^
                (DataContract?.GetHashCode() ?? 0);

            return(h);
        }
Esempio n. 3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(_underlyingProvider.GetHashCode());
 }
Esempio n. 4
0
 /// <summary>
 /// Serves as a hash function for a particular type. <see cref="M:System.Object.GetHashCode"></see> is suitable for use in hashing algorithms and data structures like a hash table.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"></see>.
 /// </returns>
 public override int GetHashCode()
 {
     return(m_underlyingFactory.GetHashCode());
 }
Esempio n. 5
0
 public string GetKey()
 {
     return($"{_providerFactory.GetHashCode()}_{_connectionString.GetHashCode()}");
 }