42 строки
1.7 KiB
XML
42 строки
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<configuration>
|
|
<configSections>
|
|
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Unity.Configuration" />
|
|
</configSections>
|
|
|
|
<unity>
|
|
<aliases>
|
|
<add alias="session" type="Microsoft.Practices.Unity.TestSupport.SessionLifetimeManager, Configuration.Tests" />
|
|
<add alias="ILogger" type="Microsoft.Practices.Unity.TestSupport.ILogger, Configuration.Tests" />
|
|
<add alias="MockLogger" type="Microsoft.Practices.Unity.TestSupport.MockLogger, Configuration.Tests" />
|
|
<add alias="SpecialLogger" type="Microsoft.Practices.Unity.TestSupport.SpecialLogger, Configuration.Tests" />
|
|
<add alias="reversed" type="Microsoft.Practices.Unity.TestSupport.ReversedSessionKeyTypeConverter, Configuration.Tests" />
|
|
</aliases>
|
|
<container>
|
|
|
|
<register type="ILogger" mapTo="SpecialLogger">
|
|
<lifetime type="singleton" />
|
|
</register>
|
|
|
|
<register type="ILogger" mapTo="MockLogger" name="mock">
|
|
<lifetime type="external" />
|
|
</register>
|
|
|
|
<register type="ILogger" mapTo="MockLogger" name="session">
|
|
<lifetime type="session" value="sessionKey" />
|
|
</register>
|
|
|
|
<register type="ILogger" mapTo="MockLogger" name="reverseSession">
|
|
<lifetime type="session" value="backwards" typeConverter="reversed" />
|
|
</register>
|
|
|
|
<register type="ILogger" mapTo="MockLogger" name="transient"/>
|
|
|
|
<register type="ILogger" mapTo="MockLogger" name="explicitTransient">
|
|
<lifetime type="" />
|
|
</register>
|
|
|
|
</container>
|
|
|
|
</unity>
|
|
</configuration> |