private void CreateNewGamefield() { _gamefield = null; //Creates new GameField each time method is called _gamefield = new SymbolDto[ROWS, COLUMNS]; for (int x = 0; x < ROWS; x++) { for (int y = 0; y < COLUMNS; y++) { //Creates new 2 dimension array of symbol objects _gamefield[x, y] = new SymbolDto(_calculator); } } }
public void CreateSymbol(SymbolDto symbol) { var symbolType = symbol.Type.StartsWith("System.") ? symbol.Type : "System." + symbol.Type; var type = Type.GetType(symbolType); if (type != null) { var adsSymbol = new AdsSymbol(symbol.Name, type); server.AddSymbol(adsSymbol); } else { throw new Exception($"Unable to find type named {symbolType}"); } }
public async Task <OpenPositionDto> GetOpenPositionBySymbolAsync([FromQuery] SymbolDto symbol) { // TODO Apply here cancellation token and figure out why it needs return(await _mediator.Send(new GetOpenPositionBySymbolQuery(symbol))); }
public GetOpenPositionBySymbolQuery(SymbolDto symbol) { Symbol = symbol; }
public void CreateSymbol([FromBody] SymbolDto symbol) { plcService.CreateSymbol(symbol); }