/// <exception cref="MemoryDatabaseTableNotFoundException"></exception> public IInMemoryTable GetTable(MemoryDatabaseTables table) { trace.Write(TraceLevel.Debug, "GetTable"); if (!inMemoryTables.ContainsKey(table)) { trace.Write(TraceLevel.Error, $"Table name {Enum.GetName(typeof(MemoryDatabaseTables), table)} not found."); throw new MemoryDatabaseTableNotFoundException(table); } trace.Write(TraceLevel.Debug, $"Get table name {Enum.GetName(typeof(MemoryDatabaseTables), table)}"); return(inMemoryTables[table]); }
/// <exception cref="MemoryDatabaseTableNotFoundException"></exception> public T GetTable <T>(MemoryDatabaseTables table) where T : IInMemoryTable { T requestedTable = (T)GetTable(table); return(requestedTable); }
public MemoryDatabaseTableNotFoundException(MemoryDatabaseTables table) : base($"Pointer of {Enum.GetName(typeof(MemoryDatabaseTables), table)} is NULL") { }