public void Handle(AddItemMessage message) { Item item = (Item)ActivateHelper.Activate(message.ItemType); Model.EquipmentHierarchy.AddItem(item); Publish(new ProjectChangedMessage()); }
public HttpResponseMessage Authenticate(string code) { try { ActivateHelper ah = new ActivateHelper(code); string rez = ah.Authenticate(); if (rez == "true") { return(OK(new { x = "You've successfully authenticated! You can Log In now." })); } else { Exception ex = new Exception("Sorry, cannot authenticate"); return(InternalServerError("Sorry, cannot authenticate.", ex)); } } catch (Exception ex) { return(InternalServerError("Sorry, cannot authenticate.", ex)); } }