/// <summary> /// Unregister a listener of extension node changes. /// </summary> /// <param name="path"> /// Path of the node. /// </param> /// <param name="handler"> /// A handler method. /// </param> /// <remarks> /// This method unregisters a delegate from the node change event of a path. /// </remarks> public static void RemoveExtensionNodeHandler(string path, ExtensionNodeEventHandler handler) { AddinEngine.CheckInitialized(); AddinEngine.RemoveExtensionNodeHandler(path, handler); }
/// <summary> /// Unregister a listener of extension node changes. /// </summary> /// <param name="instanceType"> /// Type defining the extension point /// </param> /// <param name="handler"> /// A handler method. /// </param> public static void RemoveExtensionNodeHandler(Type instanceType, ExtensionNodeEventHandler handler) { AddinEngine.CheckInitialized(); AddinEngine.RemoveExtensionNodeHandler(instanceType, handler); }
/// <summary> /// Gets extension objects registered in a path. /// </summary> /// <param name="path"> /// An extension path. /// </param> /// <param name="arrayElementType"> /// Type of the return array elements. /// </param> /// <param name="reuseCachedInstance"> /// When set to True, it will return instances created in previous calls. /// </param> /// <returns> /// An array of objects registered in the path. /// </returns> /// <remarks> /// This method can only be used if all nodes in the provided extension path /// are of type Mono.Addins.TypeExtensionNode. The returned array is composed /// by all objects created by calling the TypeExtensionNode.CreateInstance() /// method for each node (or TypeExtensionNode.GetInstance() if /// reuseCachedInstance is set to true). /// /// An InvalidOperationException exception is thrown if one of the found /// objects is not a subclass of the provided type. /// </remarks> public static object[] GetExtensionObjects(string path, Type arrayElementType, bool reuseCachedInstance) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionObjects(path, arrayElementType, reuseCachedInstance)); }
/// <summary> /// Gets extension objects registered in a path. /// </summary> /// <param name="path"> /// An extension path. /// </param> /// <param name="reuseCachedInstance"> /// When set to True, it will return instances created in previous calls. /// </param> /// <returns> /// An array of objects registered in the path. /// </returns> /// <remarks> /// This method can only be used if all nodes in the provided extension path /// are of type Mono.Addins.TypeExtensionNode. The returned array is composed /// by all objects created by calling the TypeExtensionNode.CreateInstance() /// method for each node (or TypeExtensionNode.GetInstance() if /// reuseCachedInstance is set to true). /// /// An InvalidOperationException exception is thrown if one of the found /// objects is not a subclass of the provided type. /// </remarks> public static T[] GetExtensionObjects <T> (string path, bool reuseCachedInstance) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionObjects <T> (path, reuseCachedInstance)); }
/// <summary> /// Gets extension objects registered for a type extension point. /// </summary> /// <param name="instanceType"> /// Type defining the extension point /// </param> /// <param name="reuseCachedInstance"> /// When set to True, it will return instances created in previous calls. /// </param> /// <returns> /// A list of extension objects. /// </returns> public static object[] GetExtensionObjects(Type instanceType, bool reuseCachedInstance) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionObjects(instanceType, reuseCachedInstance)); }
/// <summary> /// Gets extension objects registered in a path. /// </summary> /// <param name="path"> /// An extension path. /// </param> /// <returns> /// An array of objects registered in the path. /// </returns> /// <remarks> /// This method can only be used if all nodes in the provided extension path /// are of type Mono.Addins.TypeExtensionNode. The returned array is composed /// by all objects created by calling the TypeExtensionNode.CreateInstance() /// method for each node. /// /// An InvalidOperationException exception is thrown if one of the found /// objects is not a subclass of the provided type. /// </remarks> public static T[] GetExtensionObjects <T> (string path) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionObjects <T> (path)); }
/// <summary> /// Gets extension nodes for a type extension point /// </summary> /// <param name="instanceType"> /// Type defining the extension point /// </param> /// <returns> /// A list of nodes /// </returns> /// <remarks> /// This method returns all nodes registered for the provided type. /// It will throw a InvalidOperationException if the type of one of /// the registered nodes is not assignable to the specified node type argument. /// </remarks> public static ExtensionNodeList <T> GetExtensionNodes <T> (Type instanceType) where T : ExtensionNode { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionNodes <T> (instanceType)); }
/// <summary> /// Gets extension nodes for a type extension point /// </summary> /// <param name="instanceType"> /// Type defining the extension point /// </param> /// <param name="expectedNodeType"> /// Expected extension node type /// </param> /// <returns> /// A list of nodes /// </returns> /// <remarks> /// This method returns all nodes registered for the provided type. /// It will throw a InvalidOperationException if the type of one of /// the registered nodes is not assignable to the provided node type. /// </remarks> public static ExtensionNodeList GetExtensionNodes(Type instanceType, Type expectedNodeType) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionNodes(instanceType, expectedNodeType)); }
/// <summary> /// Gets extension nodes registered in a path. /// </summary> /// <param name="path"> /// An extension path. /// </param> /// <returns> /// A list of nodes /// </returns> /// <remarks> /// This method returns all nodes registered under the provided path. /// It will throw a InvalidOperationException if the type of one of /// the registered nodes is not assignable to the provided type. /// </remarks> public static ExtensionNodeList <T> GetExtensionNodes <T> (string path) where T : ExtensionNode { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionNodes <T> (path)); }
/// <summary> /// Gets extension nodes registered in a path. /// </summary> /// <param name="path"> /// An extension path. /// </param> /// <param name="expectedNodeType"> /// Expected node type. /// </param> /// <returns> /// A list of nodes /// </returns> /// <remarks> /// This method returns all nodes registered under the provided path. /// It will throw a InvalidOperationException if the type of one of /// the registered nodes is not assignable to the provided type. /// </remarks> public static ExtensionNodeList GetExtensionNodes(string path, Type expectedNodeType) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionNodes(path, expectedNodeType)); }
/// <summary> /// Gets extension nodes registered in a path. /// </summary> /// <param name="path"> /// An extension path.> /// </param> /// <returns> /// All nodes registered in the provided path. /// </returns> public static ExtensionNodeList GetExtensionNodes(string path) { AddinEngine.CheckInitialized(); return(AddinEngine.GetExtensionNodes(path)); }