// http://holoxplor.ddrit.com/HoloTable/Rating/sample/00fa8108-001c-bff0-0000-000000000000 // http://holoxplor.ddrit.com/HoloTable/Rating/sample/ANVL_Hornet_F7CM public ActionResult Rating(String id, String shipID) { Guid shipGuid = Guid.Empty; ShipLoadout loadout; if (Guid.TryParse(shipID, out shipGuid)) { HoloTableController._lockMap[id] = HoloTableController._lockMap.GetValue(id, new Object()); lock (HoloTableController._lockMap[id]) { DetailModel model = new DetailModel(id, shipGuid); loadout = new ShipLoadout(model); } } else { loadout = new ShipLoadout(id); } return(new ContentResult { Content = loadout.ToJSON(), ContentType = "application/json" }); }
// http://holoxplor.ddrit.com/HoloTable/Rating/sample/00fa8108-001c-bff0-0000-000000000000/ANVL_Hornet_F7CM public ActionResult Rating(String id, Guid shipID, String targetShip) { HoloTableController._lockMap[id] = HoloTableController._lockMap.GetValue(id, new Object()); lock (HoloTableController._lockMap[id]) { DetailModel model = new DetailModel(id, shipID); ShipLoadout selfLoadout = new ShipLoadout(model); ShipLoadout enemyLoadout = new ShipLoadout(targetShip); return(new ContentResult { Content = new { Self = selfLoadout, Enemy = enemyLoadout, }.ToJSON(), ContentType = "application/json" }); } }
public void UpdateLoadout(ShipLoadout loadout) { Loadout.Update(loadout); }
public ShipLoadoutOperation(ShipLoadout loadout) { this.loadout = loadout; }