예제 #1
0
        public void Configs_with_same_name_and_tags_should_have_same_hash_code()
        {
            var config1 = new MonitorConfig("Test", new[] { new Tag("tag", "value") });
            var config2 = new MonitorConfig("Test", new[] { new Tag("tag", "value") });

            config1.GetHashCode().Should().Be(config2.GetHashCode());
        }
예제 #2
0
파일: Metric.cs 프로젝트: Elders/Servo.NET
        public override int GetHashCode()
        {
            int result = config.GetHashCode();

            result = 31 * result + (int)(timestamp ^ ((long)((ulong)timestamp >> 32)));
            result = 31 * result + value.GetHashCode();
            return(result);
        }