예제 #1
0
 /// <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));
 }
예제 #2
0
 /// <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));
 }
예제 #3
0
 /// <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));
 }
예제 #4
0
 /// <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));
 }