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

            child.PatchHandlerCalled = true;

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