public IActionResult Update(ComponentParam param) { if (!param.Id.HasValue) { return(BadRequest()); } if (param.Component.Name != null && param.Component.Name != string.Empty) { update.Update(param.Id, param.Component); return(BadRequest()); } try { return(NoContent()); } catch (NotFoundComponentException) { return(NotFound()); } }
public void Update(string chain = null) { if (!Active) { return; } if (Parent != null) { inheritedVisibility = Parent.InheritedVisibility; } else { inheritedVisibility = Visible; } if (chain == null) { if (UpdateComponent != null) { UpdateComponent.Update(); } } else { if (UpdateChains != null && UpdateChains.ContainsKey(chain)) { foreach (IUpdateComponent component in UpdateChains[chain]) { component.Update(); } } } if (Children.Count != 0) { LinkedListNode <Entity> child = Children.First; while (child != null) { child.Value.Update(chain); child = child.Next; } } }