using System;
using System.Diagnostics.CodeAnalysis;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Usage
{
    [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
    public struct Rule2231
    {
        public string Name { get; set; }

        public override int GetHashCode()
        {
            return Name.GetHashCode();
        }

        // このメソッドは CA2231 に違反しています。
        public override bool Equals(object obj)
        {
            return Name == ((Rule2231)obj).Name;
        }
    }
}
