using System;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Usage
{
    public struct Rule2207
    {
        private static string ClassName;

        private int value;

        // このコンストラクタは CA2207 に違反しています。
        static Rule2207()
        {
            ClassName = "Rule2207";
        }

        public Rule2207(int value)
        {
            this.value = value;
        }

        public override bool Equals(object obj)
        {
            return this.value == ((Rule2207)obj).value;
        }

        public override int GetHashCode()
        {
            return this.value.GetHashCode();
        }

        public override string ToString()
        {
            return this.value + ":" + ClassName;
        }

        public static bool operator ==(Rule2207 obj1, Rule2207 obj2)
        {
            return obj1.Equals(obj2);
        }

        public static bool operator !=(Rule2207 obj1, Rule2207 obj2)
        {
            return !obj1.Equals(obj2);
        }
    }
}
