// Token: 0x06000F33 RID: 3891 RVA: 0x00040734 File Offset: 0x0003E934 public Exception GetSafetyNetInfosCached(out SafetyNetInfoHashTable safetyNetInfos) { SafetyNetInfoCache.InnerTable innerTable = this.m_currentTable; DateTime utcNow = DateTime.UtcNow; Exception ex = null; safetyNetInfos = null; if (this.IsReadThroughNeeded(innerTable)) { lock (this) { innerTable = this.m_currentTable; if (this.IsReadThroughNeeded(innerTable)) { try { innerTable = this.ReadNewTable(); this.m_currentTable = innerTable; this.m_lastTableLoadException = null; } catch (DumpsterRedeliveryException ex2) { ex = ex2; } catch (IOException ex3) { ex = ex3; } catch (ClusterException ex4) { ex = ex4; } if (ex != null) { this.m_lastTableLoadException = ex; SafetyNetInfoCache.Tracer.TraceError <string, Exception>((long)this.GetHashCode(), "GetSafetyNetInfosCached() for '{0}' failed to load the new table: {1}", this.m_dbGuidStr, this.m_lastTableLoadException); } } } } if (innerTable != null) { safetyNetInfos = innerTable.Table; } return(ex); }
// Token: 0x06000F39 RID: 3897 RVA: 0x00040998 File Offset: 0x0003EB98 private SafetyNetInfoCache.InnerTable ReadNewTable() { SafetyNetInfoCache.InnerTable innerTable = new SafetyNetInfoCache.InnerTable(); innerTable.Table = new SafetyNetInfoHashTable(); foreach (SafetyNetRequestKey safetyNetRequestKey in this.m_stateSafetyNetInfo.ReadRequestKeys()) { SafetyNetInfo prevInfo = null; if (this.m_currentTable != null) { this.m_currentTable.Table.TryGetValue(safetyNetRequestKey, out prevInfo); } SafetyNetInfo safetyNetInfo = this.m_stateSafetyNetInfo.ReadRequestInfo(safetyNetRequestKey, prevInfo); if (safetyNetInfo != null) { innerTable.Table.Add(safetyNetRequestKey, safetyNetInfo); } } innerTable.CreateTimeUtc = DateTime.UtcNow; return(innerTable); }
// Token: 0x06000F38 RID: 3896 RVA: 0x00040974 File Offset: 0x0003EB74 private bool IsReadThroughNeeded(SafetyNetInfoCache.InnerTable cachedTable) { return(cachedTable == null || cachedTable.CreateTimeUtc < DateTime.UtcNow - SafetyNetInfoCache.CacheTTL); }