public static T Create <T>(object[] args = null) where T : Device
        {
            var interceptor = new SetterInterceptor();
            var proxy       = (T)_generator.CreateClassProxy(typeof(T), args, interceptor);

            return(proxy);
        }
        public static object InterceptDevice(System.Type type, object device)
        {
            if (ProxyUtil.IsProxy(device))
            {
                return(device);
            }

            var interceptor = new SetterInterceptor();
            var proxy       = _generator.CreateClassProxyWithTarget(type, device, interceptor);

            return(proxy);
        }
        public static T InterceptDevice <T>(T device) where T : Device
        {
            if (ProxyUtil.IsProxy(device))
            {
                return(device);
            }

            var interceptor = new SetterInterceptor();
            var proxy       = _generator.CreateClassProxyWithTarget <T>(device, interceptor);

            return(proxy);
        }