public bool Equals(SessionFactoryStats other) { if (other == null) { return(false); } if (this == other) { return(true); } if (Equals(other.Name, Name)) { return(Equals(other.Statistics, Statistics)); } return(false); }
public SessionFactoryStats GetStatistics() { var stats = _statisticsProperty.GetValue(_sessionFactory, new object[0]); var str = (string)_sessionFactoryName.GetValue(_sessionFactory) ?? "unnamed"; var sessionFactoryStats = new SessionFactoryStats { Name = str, Statistics = StatsToDictionary(stats) }; var hashCode = sessionFactoryStats.GetHashCode(); if (_lastStatisticsHash == hashCode) { return(null); } _lastStatisticsHash = hashCode; return(sessionFactoryStats); }