現在,我正在裝飾我的StructureMap4映射的類型,例如IFormsAuthenticationProvider與CastleMap生成的代理在StructureMap4註冊表中具有tryCatchInterceptor。例如: public class AuthenticationRegistry : Registry
{
public AuthenticationRegist
我使用接口攔截器來緩存以「Get」開頭的所有方法,但我無法弄清楚如何爲每個未知參數生成一個唯一的緩存鍵是任何事情,並使用GetHashCode不是一個選項,因爲我不能100%確定他們已經重寫了GetHashCode。 的一些想法是在JSON是用於JObject我想對JSON序列化每一個參數,然後得到上面的鏈接解釋的哈希碼類似的How can I create a unique hashcode f
我們基本上有一個如下所示的類,它使用Castle.DynamicProxy進行攔截。 using System;
using System.Collections.Concurrent;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Castle.DynamicPr
我存在在我實現的具體類的NuGet包一個抽象基類,像這樣的代理對象時: public class MyConcreteClass : MyBaseAbstractClass<SomeType> {
public MyConcreteClass(IAnInterfaceOne interfaceOne, IAnInterfaceTwo interfaceTwo) : base(inter