Inheritance: EntityBase, ISetEtaggedEntity
Ejemplo n.º 1
0
 public HandledChild(HandledThing parent)
 {
     if (parent == null)
         throw new ArgumentNullException(nameof(parent));
     Parent = parent;
     Parent.Children.Add(this);
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
0
        public HandledSingleChild Patch(HandledThing parent, HandledSingleChild child)
        {
            if (parent == null)
                throw new ArgumentNullException(nameof(parent));

            child.PatchHandlerCalled = true;

            return child;
        }
Ejemplo n.º 5
0
 public HandledChild(HandledThing parent)
 {
     if (parent == null)
     {
         throw new ArgumentNullException(nameof(parent));
     }
     Parent = parent;
     Parent.Children.Add(this);
 }
Ejemplo n.º 6
0
 public HandledThing Patch(HandledThing handledThing)
 {
     handledThing.PatchCounter++;
     return this.repository.Save(handledThing);
 }
Ejemplo n.º 7
0
 public void Delete(HandledThing handledThing)
 {
     this.repository.Delete(handledThing);
 }