/// <summary> /// Adds the new context item to the current instance. If an item of the given type already exists on /// this context, it is replaced with this new item. When a null vaue is supplied it is automatically /// skipped. /// </summary> /// <param name="item">The item in question.</param> protected void AddOrUpdateContextItem(IDocumentPart item) { this.AddOrUpdateContextItem(item, item?.GetType()); }
/// <summary> /// Adds the argument to the collection of arguments on this instance. /// </summary> /// <param name="child">The child.</param> public virtual void AddChild(IDocumentPart child) { throw new InvalidOperationException($"{this.GetType().FriendlyName()} cannot contain children of type '{child?.GetType()}'"); }
/// <summary> /// Adds the argument to the collection of arguments on this instance. /// </summary> /// <param name="child">The child.</param> public override void AddChild(IDocumentPart child) { throw new InvalidOperationException($"{nameof(QueryEnumInputValue)} cannot contain children of type '{child?.GetType()}'"); }