#pragma warning disable 1591 protected override void OnRemove(int index, object value) { ObjectDescription ep = (ObjectDescription)value; if (ep.Element != null) { ep.Element.ParentNode.RemoveChild(ep.Element); ep.Element = null; } if (owner != null) { ep.SetParent(null); } }
/// <summary> /// Gets the node types allowed in this extension. /// </summary> /// <returns> /// The allowed node types. /// </returns> /// <remarks> /// This method only works when the add-in description to which the extension belongs has been /// loaded from an add-in registry. /// </remarks> public ExtensionNodeTypeCollection GetAllowedNodeTypes() { ObjectDescription ob = GetExtendedObject(); ExtensionPoint ep = ob as ExtensionPoint; if (ep != null) { return(ep.NodeSet.GetAllowedNodeTypes()); } ExtensionNodeDescription node = ob as ExtensionNodeDescription; if (node != null) { ExtensionNodeType nt = node.GetNodeType(); if (nt != null) { return(nt.GetAllowedNodeTypes()); } } return(new ExtensionNodeTypeCollection()); }
/// <summary> /// Insert an object. /// </summary> /// <param name='index'> /// Insertion index. /// </param> /// <param name='ep'> /// The object. /// </param> public void Insert (int index, ObjectDescription ep) { List.Insert (index, ep); }
/// <summary> /// Add an object. /// </summary> /// <param name='ep'> /// The object. /// </param> public void Add (ObjectDescription ep) { List.Add (ep); }
/// <summary> /// Checks if an object is present in the collection. /// </summary> /// <param name='ob'> /// Object to check. /// </param> public bool Contains (ObjectDescription ob) { return List.Contains (ob); }
/// <summary> /// Removes an object. /// </summary> /// <param name='ep'> /// Object to remove. /// </param> public void Remove (ObjectDescription ep) { List.Remove (ep); }
/// <summary> /// Insert an object. /// </summary> /// <param name='index'> /// Insertion index. /// </param> /// <param name='ep'> /// The object. /// </param> public void Insert(int index, ObjectDescription ep) { List.Insert(index, ep); }
/// <summary> /// Add an object. /// </summary> /// <param name='ep'> /// The object. /// </param> public void Add(ObjectDescription ep) { List.Add(ep); }
/// <summary> /// Checks if an object is present in the collection. /// </summary> /// <param name='ob'> /// Objecect to check. /// </param> public bool Contains(ObjectDescription ob) { return(List.Contains(ob)); }
/// <summary> /// Removes an object. /// </summary> /// <param name='ep'> /// Object to remove. /// </param> public void Remove(ObjectDescription ep) { List.Remove(ep); }