Unity (3.0) インターセプトを使用して、横断的な懸念をアプリケーションに追加しています。どういうわけか、構成で MethodSignatureMatchingRuleを使用できず、次のエラー メッセージが表示されます。
{"The type name or alias MethodSignatureMatchingRule could not be resolved. Please check your configuration file and verify this type name."}
私の構成:
<?xml version="1.0"?>
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<sectionExtension type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension, Microsoft.Practices.Unity.Interception.Configuration" />
<alias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
<containers>
<container name="MyContainer">
<extension type="Interception"/>
<interception>
<policy name="EhabAspect">
<matchingRule name="MethodSignatureMatchingRule" type="MethodSignatureMatchingRule">
<constructor>
<param name="methodName" value="Receive" type="string"/>
</constructor>
</matchingRule>
<callHandler ... (omitted)
</policy>
</interception>
<register type="IMyClass" mapTo="MyClass">
<lifetime type="singleton" />
<interceptor type="InterfaceInterceptor"/>
<policyInjection/>
</register>
</container>
</containers>
</unity>
NamespaceMatchingRuleを使用した同じ構成は正常に機能します。
私のアセンブリにはへの参照が含まれています
- Microsoft.Practices.EnterpriseLibrary.Common
- Microsoft.Practices.Unity
- Microsoft.Practices.Unity.Configuration
助言がありますか?