public bool Equals(IonMobilityLibrary other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(base.Equals(other) && Equals(other._database, _database) && Equals(other.DatabasePath, DatabasePath)); }
public bool Equals(IonMobilityLibrary other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (!base.Equals(other)) { return(false); } // N.B. not comparing Status members, which exist only for the benefit of audit logging if (!Equals(other.FilePath, FilePath)) { return(false); } if (!Equals(Count, other.Count)) { return(false); } if (Count <= 0) { return(true); // Both not yet in memory } foreach (var key in _database.DictLibrary.LibKeys) { if (!other._database.DictLibrary.TryGetValue(key, out var otherValues)) { return(false); } _database.DictLibrary.TryGetValue(key, out var values); if (values.Count != otherValues.Count) { return(false); } foreach (var ionMobilityAndCcs in values) { if (!otherValues.Contains(ionMobilityAndCcs)) { return(false); } } } return(true); }
private IonMobilityLibrary LoadIonMobilityLibrary(IDocumentContainer container, IonMobilityLibrary dtLib) { // TODO: Something better than locking for the entire load lock (_loadedIonMobilityeLibraries) { IonMobilityLibrary libResult; if (!_loadedIonMobilityeLibraries.TryGetValue(dtLib.Name, out libResult)) { libResult = (IonMobilityLibrary)dtLib.Initialize(new LoadMonitor(this, container, dtLib)); if (libResult != null) { _loadedIonMobilityeLibraries.Add(libResult.Name, libResult); } } return(libResult); } }
private IonMobilityLibrary LoadIonMobilityLibrary(IDocumentContainer container, IonMobilityLibrary dtLib) { // TODO: Something better than locking for the entire load lock (_loadedIonMobilityeLibraries) { IonMobilityLibrary libResult; if (!_loadedIonMobilityeLibraries.TryGetValue(dtLib.Name, out libResult)) { libResult = (IonMobilityLibrary) dtLib.Initialize(new LoadMonitor(this, container, dtLib)); if (libResult != null) _loadedIonMobilityeLibraries.Add(libResult.Name, libResult); } return libResult; } }
public bool Equals(IonMobilityLibrary other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return base.Equals(other) && Equals(other._database, _database) && Equals(other.DatabasePath, DatabasePath); }