public string AddTable(string type, int tableNumber, int capacity) { ITable table = tableFactory.CreateTable(type, tableNumber, capacity); tables.Add(table); return($"Added table number {table.TableNumber} in the bakery"); }
private KeyValuePair <string, Table> CreateRomRaiderRamTable(string name, int offset, string id, int length) { XElement xel = XElement.Parse(@" <ecu id=""""> <address length=""""></address> </ecu> "); xel.Attribute("id").Value = this.parentMod.FinalEcuId; string ts = offset.ToString("X6"); ts = ts.Substring(2, ts.Length - 2); if (ts.Length < 6 && ts.Substring(0, 2) != "FF") { Trace.WriteLine("!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!"); Trace.WriteLine("WARNING! bad ram table: " + name + " with offset: " + offset.ToString("X")); } xel.Element("address").Value = "0x" + ts; xel.Element("address").Attribute("length").Value = length.ToString(); return(new KeyValuePair <string, Table>(name, TableFactory.CreateTable(xel, null))); }