extensions +extensionConfig

Nov 13, 2009 at 2:50 AM



Hi all,

I would like to understand what exactly the "extensions" element in configuration and how it is linked to  extensionConfig? I want to know how to interpret the below.






          <add type="Microsoft.Practices.Unity.InterceptionExtension.Interception,Microsoft.Practices.Unity.Interception, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

          <add type="abc.UnityDataAccessExtension, abc.DataAccess" />



          <add name="interception" type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationElement, Microsoft.Practices.Unity.Interception.Configuration, Culture=neutral, PublicKeyToken=31bf3856ad364e35">


              <policy name="AllCalls">


                  <matchingRule name="All" type="some type" />



                  <callHandler name="handler" type="some type" />



              <policy name="some calls">


                  <matchingRule name="some" type="some type" />



                  <callHandler name="handler" type="some type" />









Nov 18, 2009 at 1:07 AM

The <extension> element is the same as doing this in the API:

container.AddExtension(new WhateverMyExtensionTypeIs());

it adds a container extension instance.

The <extensionConfig> element is, on the other hand, a catch all extensibility point so that you can add arbitrary stuff to the configuration section for a container. An extensionConfig element is usually, but does not have to be, associated with a container.