using System; using Microsoft.CodeAnalysis.Editing; namespace CTA.Rules.Models { public class IdentifierNameAction : GenericAction { public Func IdentifierNameActionFunc { get; set; } public override bool Equals(object obj) { var action = (IdentifierNameAction)obj; return action?.Key == this.Key && action?.Value == this.Value && action?.IdentifierNameActionFunc.Method.Name == this.IdentifierNameActionFunc.Method.Name; } public override int GetHashCode() { return HashCode.Combine(Key, Value, IdentifierNameActionFunc?.Method.Name); } public override IdentifierNameAction Copy() { IdentifierNameAction copy = (IdentifierNameAction)base.Copy(); copy.IdentifierNameActionFunc = this.IdentifierNameActionFunc; return copy; } } }