using System; using System.Windows.Forms; namespace Common.Infrastructure.Messaging { public class BusyMessage { public bool IsBusy { get; set; } public string Key { get; private set; } public BusyMessage(string key) : this(key, false) { } public BusyMessage(string key, bool isBusy) { IsBusy = isBusy; Key = key; } public override int GetHashCode() { return Key.GetHashCode(); } public override bool Equals(object obj) { if (obj == null) return false; var other = obj as BusyMessage; if (other == null) return false; if (other.Key != this.Key) return false; return true; } } }