Example #1
0
        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);
        }
Example #2
0
        public HandledSingleChild Patch(HandledThing parent, HandledSingleChild child)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }

            child.PatchHandlerCalled = true;

            return(child);
        }
Example #3
0
 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));
 }
Example #4
0
 public HandledSingleChild(HandledThing handledThing)
 {
     HandledThing = handledThing;
 }
Example #5
0
 public HandledThing Patch(HandledThing handledThing)
 {
     handledThing.PatchCounter++;
     return(this.repository.Save(handledThing));
 }
Example #6
0
 public void Delete(HandledThing handledThing)
 {
     this.repository.Delete(handledThing);
 }