Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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);
        }