public HandledChild(HandledThing parent) { if (parent == null) throw new ArgumentNullException(nameof(parent)); Parent = parent; Parent.Children.Add(this); }
public HandledThing Post(HandledThing handledThing, PomonaContext context) { if (handledThing == null) throw new ArgumentNullException(nameof(handledThing)); if (context == null) throw new ArgumentNullException(nameof(context)); handledThing.Marker = "HANDLER WAS HERE!"; return (HandledThing)this.repository.Post(handledThing); }
public HandledChild Post(HandledThing parent, HandledChild postedChild) { if (parent != postedChild.Parent) throw new InvalidOperationException("Parent was not set correctly for posted child."); postedChild.HandlerWasCalled = true; this.repository.Post(postedChild); return postedChild; }
public HandledSingleChild Patch(HandledThing parent, HandledSingleChild child) { if (parent == null) throw new ArgumentNullException(nameof(parent)); child.PatchHandlerCalled = true; return child; }
public HandledChild(HandledThing parent) { if (parent == null) { throw new ArgumentNullException(nameof(parent)); } Parent = parent; Parent.Children.Add(this); }
public HandledThing Patch(HandledThing handledThing) { handledThing.PatchCounter++; return this.repository.Save(handledThing); }
public void Delete(HandledThing handledThing) { this.repository.Delete(handledThing); }