public async Task <List <Message> > getMessagesfromEndpoints(List <Message> listMess, string DashboardID) { var connectionManagerDataSection = ConfigurationManager.GetSection(ConnectionManagerDataSection.SectionName) as ConnectionManagerDataSection; foreach (ConnectionManagerEndpointElement endpointElement in connectionManagerDataSection.ConnectionManagerEndpoints) { if (DashboardID == endpointElement.dashboardId) { GetTileValue processValue = new GetTileValue(server); var result = await RequestAPI.processGetTile(endpointElement.messageUrl, endpointElement.messagePath, true); foreach (var item in listMess) { item.messageList.Add(result); } } } return(listMess); }
private async Task <ModelShow.Tile> processTile(Tile tile, ModelShow.Tile tileshow, string dashboardid, bool PararellProcessTiles) { tileshow.color = tile.fixedColor; if (tile.fixedValueCommon != null) { tileshow.value = tile.fixedValueCommon + " "; } if (tile.fixedValueUnique != null) { tileshow.value = tile.fixedValueUnique; } if (tile.colorSource != null) { GetTileColor processColor = new GetTileColor(server, errorColor); tileshow.color = await processColor.getTileColor(tile, PararellProcessTiles); if (tile.colorSource.fontColorPath != null) { GetTileFontColor processFontColor = new GetTileFontColor(server, errorColor); var resultColor = await processFontColor.getTileFontColor(tile, PararellProcessTiles); if (resultColor == null) { tileshow.textProperties.fontColor = errorColor; } else { tileshow.textProperties.fontColor = resultColor; } } } else { tileshow.color = tile.fixedColor; } if (tile.dataSource != null) { GetTileValue processValue = new GetTileValue(server); tileshow.value = await processValue.getTileValue(tile, dashboardid, PararellProcessTiles); } else { tileshow.value = ""; if (tile.fixedValueCommon != null) { tileshow.value = tile.fixedValueCommon + " "; } if (tile.fixedValueUnique != null) { tileshow.value += tile.fixedValueUnique; } } if (tile.emphasysSource != null) { GetTileEmphasys processEmp = new GetTileEmphasys(server); var resultEmp = await processEmp.getTileEmphasys(tile, PararellProcessTiles); if (resultEmp == null) { tileshow.value = "ErroEmp"; } else { tileshow.emphasys = (bool)resultEmp; } } else { tileshow.emphasys = false; } if (tile.rail != null) { tileshow.rail = tile.rail; } return(tileshow); }