Sitecore 5.0 API

ConfigReader.GetImplementationNode Method 

Gets a specific implementation node.

[Visual Basic]
Public Shared Function GetImplementationNode( _
   ByVal _interface As String, _
   ByVal configName As String _
) As XmlNode
[C#]
public static XmlNode GetImplementationNode(
   string _interface,
   string configName
);

Parameters

_interface
Name of interface to find an implementation for.
configName
Configuration name of implementation (specified in the configName attribute in web.config).

Return Value

Requested configuration node. If no node is found, null is returned.

Remarks

Implementation nodes are nodes describing 'pluggable' types. These are typically data providers or other types that may vary significantly between installations.

Example

Get the configuration node for the master database index and display the name of the class implementing it:

  XmlNode node = GetImplementationNode(typeof(IIndex), "master");
  MainUtil.Out("Master index implemented by: " + XmlUtil.GetAttribute("class", node));
Outputs: Master index implemented by: Sitecore.Index.

See Also

ConfigReader Class | Sitecore.Configuration Namespace