Esempio n. 1
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>

        public override int GetHashCode()
        {
            unchecked
            {
                return(((Dictionary?.GetHashCode() ?? 0) * 397) ^ (int)SerializationKeyFilter);
            }
        }
Esempio n. 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((LegendItem?.GetHashCode() ?? 0) * 397) ^ (Name?.GetHashCode() ?? 0));
     }
 }
Esempio n. 3
0
 public string convert(string source, Dictionary<string, object> attributes, Dictionary<string, object> model)
 {
     String key = source.GetHashCode() + "-" + attributes.GetHashCode();
     if (!cache.Contains(key))
     {
         cache.Add(key, convert(source, attributes));
     }
     return (string) cache[key];
 }
Esempio n. 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = 37;
         hashCode = (hashCode * 397) ^ (_remoteFiles?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (_fileBasedResolver?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Esempio n. 5
0
 public override int GetHashCode() => _values.GetHashCode();
Esempio n. 6
0
        public string GetTreatment(Key key, string feature, Dictionary <string, object> attributes = null, bool logMetricsAndImpressions = true, bool multiple = false)
        {
            string featureHash = string.Concat(key.matchingKey, "#", feature, "#", attributes != null ? attributes.GetHashCode() : 0);

            if (multiple && treatmentCache.ContainsKey(featureHash))
            {
                return(treatmentCache[featureHash]);
            }

            var result = GetTreatmentForFeature(key, feature, attributes, logMetricsAndImpressions);

            if (multiple)
            {
                treatmentCache.TryAdd(featureHash, result);
            }

            return(result);
        }
Esempio n. 7
0
 public override int GetHashCode()
 {
     return(_tags?.GetHashCode() ?? 0);
 }
Esempio n. 8
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>A hash code for the current <see cref="T:System.Object"/>.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((_class != null ? _class.GetHashCode() : 0) * 397) ^ (_properties != null ? _properties.GetHashCode() : 0));
     }
 }
Esempio n. 9
0
 public override int GetHashCode()
 {
     return(_dictionary?.GetHashCode() ?? 0);
 }
 public override int GetHashCode() => DataDictionary.GetHashCode();
Esempio n. 11
0
 public override int GetHashCode()
 {
     return(_data != null ? _data.GetHashCode() : 0);
 }
Esempio n. 12
0
 /// <summary>
 /// Calculates Class HashCode
 /// </summary>
 /// <returns>Hashcode</returns>
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^ History.GetHashCode() ^ ChatLogs.GetHashCode());
 }
 public int GetHashCode(Dictionary <TKey, TValue> obj)
 {
     return((int)obj?.GetHashCode());
 }
Esempio n. 14
0
 public override int GetHashCode()
 {
     return(baseDirectory.GetHashCode() ^ scripts.GetHashCode());
 }
Esempio n. 15
0
 /// <summary>
 /// Serves as a hash function for a <see cref="Couchbase.Lite.Store.ContentValues"/> object.
 /// </summary>
 /// <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a
 /// hash table.</returns>
 public override int GetHashCode()
 {
     return(mValues.GetHashCode());
 }
Esempio n. 16
0
 public override int GetHashCode()
 {
     return(body.GetHashCode());
 }
Esempio n. 17
0
 public override int GetHashCode()
 {
     return(_statMaps != null?_statMaps.GetHashCode() : 0);
 }
Esempio n. 18
0
 ///<summary>
 ///Serves as a hash function for a particular type.
 ///</summary>
 ///
 ///<returns>
 ///A hash code for the current <see cref="T:System.Object" />.
 ///</returns>
 ///<filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     return(_propDefs != null ? _propDefs.GetHashCode() : 0);
 }
Esempio n. 19
0
 public override int GetHashCode()
 {
     return(attributes.GetHashCode());
 }
Esempio n. 20
0
        // create a type... for future use.
        public static Type CreateClass(Dictionary<string, string> dic )
        {
            var className = dic.GetHashCode().ToString();

            return CreateClass(dic, className);
        }
Esempio n. 21
0
 public override int GetHashCode()
 {
     return(attributes != null ? attributes.GetHashCode() : 0);
 }
Esempio n. 22
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() | mOptionGroups.GetHashCode());
 }
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(Prediction.GetHashCode() ^ Probabilities.GetHashCode());
 }
Esempio n. 24
0
 //--------------------------------------------------------------------------------------------------------------------------------
 public override int GetHashCode()
 {
     return(Raw.GetHashCode());
 }
Esempio n. 25
0
 public int GetHashCode(Dictionary <string, LogLevel> obj)
 {
     return(obj?.GetHashCode() ?? 0);
 }
Esempio n. 26
0
 public override int GetHashCode()
 {
     return(_constraints?.GetHashCode() ?? 0);
 }
Esempio n. 27
0
        public void PrintToString_OnIDictionary()
        {
            var dict = new Dictionary <string, Node> {
                { "abc", new Node() }
            } as IDictionary <string, Node>;
            var kvPair   = dict.First();
            var expected =
                $"{{\r\n\t{{\r\n\t\tkey: abc (Hash: {kvPair.Key.GetHashCode()})\r\n\t\tvalue: " +
                $"Node (Hash: {kvPair.Value.GetHashCode()})\r\n\t\t\t\tneighbor = null\r\n\t}}\r\n}} (Hash: {dict.GetHashCode()})";

            dict.PrintToString().Should().Be(expected);
        }
Esempio n. 28
0
 public override int GetHashCode()
 {
     return((m_dictionary == null) ? 0 : m_dictionary.GetHashCode());
 }
 public int GetHashCode(Dictionary <string, string> x)
 {
     return(x.GetHashCode());
 }
Esempio n. 30
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     return(items != null ? items.GetHashCode() : 0);
 }
Esempio n. 31
0
 public override int GetHashCode()
 {
     return(HashUtilities.Combine(_trackedInstanceFieldLocationsOpt?.GetHashCode() ?? 0, base.GetHashCode()));
 }
Esempio n. 32
0
 public override int GetHashCode()
 {
     return(_dict.GetHashCode());
 }