public static T Wrap(T obj, OnDataChangeFunction redirectFunction) { var dynamicProxy = new DynamicProxy <T>(obj, redirectFunction); return(dynamicProxy.GetTransparentProxy() as T); }
public DynamicProxy(T decorated, OnDataChangeFunction onDataChange) : base(typeof(T)) { _onDataChange = onDataChange; _decorated = decorated; }