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 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 HandledSingleChild(HandledThing handledThing) { HandledThing = handledThing; }
public HandledThing Patch(HandledThing handledThing) { handledThing.PatchCounter++; return(this.repository.Save(handledThing)); }
public void Delete(HandledThing handledThing) { this.repository.Delete(handledThing); }