public bool TryCreateTable(ITableSelector selector, out ITableConfig table) { table = Factories.Table.Create(this, selector); if (!TableValidator.Validate(table)) { return(false); } table = this.Tables.AddOrUpdate(table.Identifier, table); this.Configure(table); return(true); }
public ITableConfig CreateTable(ITableSelector selector) { var table = Factories.Table.Create(this, selector); if (!TableValidator.Validate(table)) { throw new InvalidOperationException(string.Format("Table has invalid configuration: {0}", table)); } table = this.Tables.AddOrUpdate(table.Identifier, table); this.Configure(table); return(table); }