public void UnregisterById(IAdaptable adaptable, string id, XDocument document) { IDKey key = CreateIDKey(id, document); if (_idMap.TryGetValue(key, out IAdaptable a) && a.Equals(adaptable)) { // Logger.Info($"NodeAdaptableRegistry.UnregisterById: item was unregistered {adaptable}"); _idMap.Remove(key); } }
public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj == null || !(obj is IDKey)) { return(false); } IDKey that = obj as IDKey; return(this.Document.Equals(that.Document) && this.Id.Equals(that.Id)); }