<Type Name="TypeExtensionNode" FullName="Mono.Addins.TypeExtensionNode">
  <TypeSignature Language="C#" Value="public class TypeExtensionNode : Mono.Addins.ExtensionNode" />
  <AssemblyInfo>
    <AssemblyName>Mono.Addins</AssemblyName>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Mono.Addins.ExtensionNode</BaseTypeName>
  </Base>
  <Interfaces />
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public TypeExtensionNode ();" />
      <MemberType>Constructor</MemberType>
      <Parameters />
      <Docs>
        <summary>Initializes a new instance.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="CreateInstance">
      <MemberSignature Language="C#" Value="public virtual object CreateInstance ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Creates a new extension object.</summary>
        <returns>The new instance.</returns>
        <remarks>Creates a new extension object of the type represented by this node.</remarks>
      </Docs>
    </Member>
    <Member MemberName="CreateInstance">
      <MemberSignature Language="C#" Value="public object CreateInstance (Type expectedType);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="expectedType" Type="System.Type" />
      </Parameters>
      <Docs>
        <param name="expectedType">Expected object type.</param>
        <summary>Creates a new extension object.</summary>
        <returns>The new instance.</returns>
        <remarks>Creates a new extension object of the type represented by this node. This method will throw an <see cref="T:System.InvalidOperationException" /> if the resulting object is not an instance of the provided type (or a subclass of it).</remarks>
      </Docs>
    </Member>
    <Member MemberName="GetInstance">
      <MemberSignature Language="C#" Value="public object GetInstance ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Gets the extension object.</summary>
        <returns>The extension object.</returns>
        <remarks>Returns an extension object of the type represented by this node. If the instance was already created in a previous GetInstance call, the same instance will be returned.</remarks>
      </Docs>
    </Member>
    <Member MemberName="GetInstance">
      <MemberSignature Language="C#" Value="public object GetInstance (Type expectedType);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="expectedType" Type="System.Type" />
      </Parameters>
      <Docs>
        <param name="expectedType">Expected object type.</param>
        <summary>Gets the extension object.</summary>
        <returns>The extension object.</returns>
        <remarks>Returns an extension object of the type represented by this node. If the instance was already created in a previous GetInstance call, the same instance will be returned.

<para>This method will throw an <see cref="T:System.InvalidOperationException" /> if the resulting object is not an instance of the provided type (or a subclass of it).
</para></remarks>
      </Docs>
    </Member>
  </Members>
  <Docs>
    <summary>An extension node which specifies a type.</summary>
    <remarks>
      <para>This class is a kind of <see cref="T:Mono.Addins.ExtensionNode" /> which can be used to register types in an extension point. This is a very common case: a host application defines an interface, and add-ins create classes that implement that interface. The host will define an extension point which will use TypeExtensionNode as node type. Add-ins will register the classes they implement in that extension point.
</para>
      <para>
When the nodes of an extension point are of type TypeExtensionNode it is then possible to use query methods such as <see cref="M:Mono.Addins.AddinManager.GetExtensionObjects(System.String)" />, which will get all nodes in the provided extension path and will create an object for each node.
</para>
      <para>
When declaring extension nodes in an add-in manifest, the class names can be specified using the 'class' or 'type' attribute. If none of those attributes is provided, the class name will be taken from the 'id' attribute.
</para>
      <block subset="none" type="note">
        <para>
TypeExtensionNode is the default extension type used when no type is provided in the definition of an extension point.
  </para>
      </block>
      <example>
        <code lang="XML">
&lt;Addin id = "WriterService" version = "0.1.0" isroot="true"&gt;

	&lt;Runtime&gt;
		&lt;Import assembly="WriterService.dll"/&gt;
	&lt;/Runtime&gt;
	
	&lt;ExtensionPoint path = "/WriterService/Writers"&gt;
		&lt;ExtensionNode id="Writer" type="TypeExtensionNode"/&gt;
	&lt;/ExtensionPoint&gt;
	
&lt;/Addin&gt;
  </code>
      </example>
    </remarks>
  </Docs>
  <Attributes>
    <Attribute>
      <AttributeName>Mono.Addins.ExtensionNode("Type")</AttributeName>
    </Attribute>
  </Attributes>
</Type>