コード例 #1
0
        public IEnumerable <TableRowDTO> GetTable(string competitioName, CompetitionTableType tableType)
        {
            var           games   = gamesService.GetFinishedCompetitionGames(competitioName);
            ITableBuilder builder = TableBuilderFactory.CreateTableBuilder(tableType);

            return(builder.Build(games));
        }
コード例 #2
0
 public void CreateTable(ITableBuilder tableBuilder)
 {
     Guard.ArgumentNotNull(tableBuilder, nameof(tableBuilder));
     foreach (string statement in tableBuilder.Build())
     {
         this.Connection.Execute(statement); //execute create table and other DML Statements!
     }
 }
コード例 #3
0
        public ReportBuilder AddTable(ITableBuilder tableBuilder)
        {
            if (report.Tables == null)
            {
                report.Tables = new List <PdfTableModel>();
            }

            report.Tables.Add(tableBuilder.Build(HasAlternatingRowBackgroundColor, AlternatingRowBackgroundColor));

            return(this);
        }
コード例 #4
0
        protected void AddTable(Package package, string mainTableId, ITableBuilder mainTableBuilder, string headersTableId = null, ITableBuilder headersTableBuilder = null)
        {
            var mainTable = mainTableBuilder.Build();

            if (mainTable != null)
            {
                package.PrimaryTableIds.Add(mainTableId);
                package.Tables.Add(mainTableId, mainTable);
                if (!string.IsNullOrWhiteSpace(headersTableId) && headersTableBuilder != null)
                {
                    mainTable.Definition.HeaderTableId = headersTableId;
                    var headersTable = headersTableBuilder.Build();
                    package.Tables.Add(headersTableId, headersTable);
                }
            }
        }
コード例 #5
0
ファイル: Dealer.cs プロジェクト: thebuchanan3/Blackjack
 public DealerBuilder(IDeckBuilder deckBuilder, ITableBuilder tableBuilder)
 {
     _deck = deckBuilder.Build();
     _table = tableBuilder.Build();
 }