Exemple #1
0
        public static T Wrap(T obj, OnDataChangeFunction redirectFunction)
        {
            var dynamicProxy = new DynamicProxy <T>(obj, redirectFunction);

            return(dynamicProxy.GetTransparentProxy() as T);
        }
Exemple #2
0
 public DynamicProxy(T decorated, OnDataChangeFunction onDataChange)
     : base(typeof(T))
 {
     _onDataChange = onDataChange;
     _decorated    = decorated;
 }